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

I have a textbutton that makes it so when a player clicks it. They have no walkspeed?

Asked by 4 years ago

So im trying to make it so when a player clicks the text button they cant walk or jump. it was a simple script but still it didn't work

1script.Parent.MouseButton1Click:Connect(function()
2    script.Parent.Parent.Parent.HidePlayers.Disabled = false
3    game.StarterPlayer.CharacterJumpPower = "0"
4    game.StarterPlayer.CharacterWalkSpeed = "0"
5 
6end)
0
gui button? catsalt29 57 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

if it is a gui button then here is some code

1script.Parent.MouseButton1Click:Connect(function(player)
2player.Character.Humanoid.WalkSpeed = 0
3player.Character.JumpPower = 0
4end)
0
thanks dude! DataCordz 6 — 4y
Ad

Answer this question