Imgflip Logo Icon

the two annoying fucking errors i get whenever i try to pick up a weapon in my game rn.

the two annoying fucking errors i get whenever i try to pick up a weapon in my game rn. | made w/ Imgflip meme maker
52 views 5 upvotes Made by Craptyyboi 2 weeks ago in MS_memer_group
7 Comments
0 ups, 2w
I don’t care if it’s annoying

It’s going in my anus either way
0 ups, 2w
get a weapon irl and shoot the errors
0 ups, 2w,
2 replies
NullReferenceException means that your script is trying to reference something, but there's nothing assigned for it to reference. Meaning it's just screaming into the void.
You can fix it by making sure every variable is assigned, both within the script and Unity itself.
If your interact script uses rigidbodies, for instance, make sure your weapons have rigidbodies.
0 ups, 2w,
1 reply
aight.
0 ups, 2w
Lmk if I can help
0 ups, 2w,
1 reply
my idea was to add bare fists as a weapon, but my tutor said to leave the switch thing empty on because, how the f**k do you hold your fists.
0 ups, 2w
I think what you need is a part of your interact script that checks to see if you currently have a weapon equipped. If there is no weapon equipped, then you toggle on your fists, and toggle them off if you do have a weapon equipped.
Created with the Imgflip Meme Generator