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

I made this Anitsit and walkspeed script but why is it not working?

Asked by 5 years ago
Edited by SerpentineKing 5 years ago

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

0
Have you tried using GetPlayerFromCharacter() as an alternative to FindFirstChild()? DeceptiveCaster 3761 — 5y

Answer this question