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

how to equip a tool to a player?

I made a tool that unequips itself but then i want it to equip itself again but it doesent work here is the code


Humanoid:UnequipTools wait(3) Humanoid:EquipTools


Can anyone help Thanks

3 comments

0

where is your parentheses? make it like "Humanoid:UnequipTools()"

0

I tried adding parentheses but it still didint work btw i am using a regular script

0

also Humanoid:UnequipTools would work but Humanoid:EquipTools would not work

1 answer

The EquipTool function (no 's' on the end), requires a parameter which will be the tool that the humanoid will equip.

Example:

local Tool = game.ReplicatedStorage:WaitForChild("Tool")

game.Players.PlayerAdded:Connect(function(Player)

	local Character = Player.Character or Player.CharacterAdded:Wait() -- Getting the character or if the character isn't loaded in then it'll yield the script until it is.

	local Humanoid = Character:WaitForChild("Humanoid")

	Humanoid:EquipTool(Tool) -- Equips the given tool.
end)

2 comments

0

It still doesent work

0

The idea was that the tool would dissapier when they equip it then the animation would play, but then once its done the tool would re-apear

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