I've been having trouble trying to figure out why my code isn't working, basically- I'm trying to make that if it is touched by a player, it will be put into their inventory.
Code:
tool = script.Parent
Handle = tool.Parent
enabled = false
script.Parent.Touched:Connect(function(OnTouched)
h = script.Parent.Players.PlayerAdded:FindFirstChild("Humanoid")
if h == true then
if debounce == false then
debounce = true
tool.Equipped:Connect(function()
if h == false then
return
end
end)

1 comment
Doesn’t it automatically do that