Hi, I made script with customization. I have special camera to see player but when they making character they can move. How can I stun player until he clicks the button?
If it is a Local script you can do this
1 | local player = game.Players.LocalPlayer |
2 | repeat wait() until player.character -- makes sure player.character is there before assigning it as a value |
3 | local character = player.character |
4 | local humanoid = character.Humanoid |
5 |
6 | OnFunction:Connect() -- whatever function you want to enable this |
7 | humanoid.WalkSpeed = 0 |
8 | humanoid.JumpPower = 0 -- you probably don't want him/her to jump either |
9 | end |
Just incorporate this into your code. It should work.