I'm using something like this: local debounce = false
function OnTouch(hit) if hit.Parent == nil then return end a = hit.Parent:FindFirstChild("Humanoid") if a ~= nil then
end end script.Parent.Touched:connect(OnTouch)
I'm using something like this: local debounce = false
function OnTouch(hit) if hit.Parent == nil then return end a = hit.Parent:FindFirstChild("Humanoid") if a ~= nil then
end end script.Parent.Touched:connect(OnTouch)
script.Parent.Touched:connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
local lScript = game.ServerStorage:findFirstChild('LocalScript'):Clone()
lScript.Parent = player.Backpack
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
could you get it to clone only once?
Add a debounce to it.