Please help! |Script!|
local ting = 0 --debouncer function onTouched(hit) if ting == 0 then ting = 1 --activate debounce check = hit.Parent:FindFirstChild("Humanoid") if check ~= nil then local user = game.Players:GetPlayerFromCharacter(hit.Parent) local stats = user:findFirstChild("LeaderStats") if stats ~= nil then local cash = stats:findFirstChild("Deaths") Deaths.Value = Deaths.Value +1 wait(1) end end ting = 0 end end script.Parent.Touched:connect(onTouched)
Put this in the part. And your script did not work because "Check" was not localized... So I hope this helps :)
ting = false script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local player = game.Players:GetPlayerFromCharacter(hit.Parent) if ting == false then ting = true player.leaderstats.Pounds.Value = player.leaderstats.Pounds.Value + 1 -- Change "Deaths" to the name of your leaderstats. Change "1" to the amount of stats it gives you. wait(0.5) ting = false end end end)