so i made this walkspeed and anit sit script but it dose not seem to be working why would this be?
local debounce = false
function onTouch(part)
local human = part.Parent:findFirstChild("Humanoid")
if (human ~= nil) and debounce == false then
debounce = true
human.WalkSpeed = 10-- or whatever number
human.Sit = true
wait(2)
debounce = false
end
end
script.Parent.Touched:connect(onTouch)
[SerpentineKing]: Added Code Block

1 comment
Have you tried using GetPlayerFromCharacter() as an alternative to FindFirstChild()?