Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is this EquipTool function not firing like its supposed to?

Asked by 4 years ago

I'm working on an inventory system with the Roblox backpack disabled. I'm confused here. This block of code isn't working. but things like print() are. I know the event is firing and no errors have been shown.

Server Script:

script.Parent.Items.Equip.OnServerEvent:Connect(function(plr, tool)
    plr.Character:WaitForChild('Humanoid'):EquipTool(tool)
end)

The event is firing and all but the code seems to just seamlessly disappear into the background. Other functions like print() are working just fine in the event (btw this is in a GUI).

0
Should I pass the tools name? AdminAyush 10 — 4y
0
And use it to search for the tool in a list of tools, yes. pidgey 548 — 4y
0
Thanks AdminAyush 10 — 4y
0
Pidgey is wrong, you can pass instances User#24403 69 — 4y

Answer this question