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 3 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

script.Parent.MouseButton1Click:Connect(function()
    script.Parent.Parent.Parent.HidePlayers.Disabled = false
    game.StarterPlayer.CharacterJumpPower = "0"
    game.StarterPlayer.CharacterWalkSpeed = "0"

end)

0
gui button? catsalt29 57 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

if it is a gui button then here is some code

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

Answer this question