Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I stun player until he clicks the button?

1 answer

If it is a Local script you can do this

local player = game.Players.LocalPlayer
repeat wait() until player.character -- makes sure player.character is there before assigning it as a value
local character = player.character
local humanoid = character.Humanoid

OnFunction:Connect() -- whatever function you want to enable this
 	humanoid.WalkSpeed = 0 
        humanoid.JumpPower = 0 -- you probably don't want him/her to jump either
end

Just incorporate this into your code. It should work.

3 comments

0

and vise versa for unstunning

0

nah, doesn't work

0

Its not an actual function, I left the freedom of choosing your own event. Also I forgot function in the parenthesis on line 6. I'll get back to you with a tested code if that does'nt work

This discussion is preserved as it was. New answers, comments, and votes are closed.