- You need to wait for the character to load before you can access it. I'd do the same for the humanoid just to be safe. 2) You can't disable the "Jump" property like that. The "Jump" property lets you see if the character is jumping, and if you set it to true, the character will jump. Then it immediately gets set back to false. 3) You can't wait for .0001 seconds in Roblox. The frames go by slower than that. Use wait() without adding a number in the parenthesis, and that will wait for about 1/30 of a second. That's the fastest you can go if you don't use RunService. 4) In general, I wouldn't use while true do if I were you. It will lag up the game. Use the Changed event. I'll show you how to do that.
Player = game.Players.LocalPlayer
repeat wait() until Player.Character
character = Player.Character
hum = character:WaitForChild("Humanoid")
hum.WalkSpeed = 0
hum.Changed:connect(function()
if hum.WalkSpeed ~= 0 then hum.WalkSpeed = 0 end
end
2 comments
We need a little bit more information then this. Are there any output errors? Give us some or all of your script. We might be able to help a bit more if we had these things.
im trying to keep the code running even if i move the cam(i've used every other loop function but still doesnt work heres the code