Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Humanoid.EquipTool is not working in a local script?

Hello, I am trying to make a script were a player can equip a trident, but its not working, here is the code that the error is from

			local tridentc = trident:Clone()
			tridentc.Parent = player.Backpack
			tridentc.Name = "Trident1"
			character.Humanoid.EquipTool(tridentc)
 			 

I keep on getting an error that says

** 2:07:21.324 - The function EquipTool is not a member of "Tool" **

what did I do wrong?

2 answers

✓ Accepted answer

The issue you are having is that you're trying to use a . instead of a :

Therefore what you should do is

local clone = trident:Clone()

clone.Name = 'Trident1'

clone.Parent = player.Backpack

character.Humanoid:EquipTool(clone)

This should work perfectly now. But I should add Mc3334 is correct, if you'd like it to just be automatically equipped. Setting the clones parent to the player.Character may be a bit more beneficial.

But yeah that was your issue :)

2 comments

0

Thanks for the help

0

No problem! glad I could help!

To get your results, you could clone the tool under the player's character. It would look something like this.

local tridentc = trident:Clone()
tridentc.Parent = player.Character --I changed the "Backpack" to "Character" so it will equip the tool
tridentc.Name = "Trident1"

I hope this was helpful. If you need further help regarding this topic, feel free to comment on my post.

1 comment

0

Hello thanks for helping out, but the trident spawns only in the middle of the baseplate, when I parent the trident clone to character?

This discussion is preserved as it was. New answers, comments, and votes are closed.