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

How to disable movement when GUI is visible?

Asked by
zomspi 541 Moderation Voter
4 years ago

How might I disable movement of the player when a frame is visible?

1 answer

Log in to vote
1
Answered by 4 years ago

Try this maybe :

if game.StarterGui.ScreenGui.Frame.Visible == true then player.CharacterAppearanceLoaded:Connect(function(character) character.humanoid.WalkSpeed = 0 end) end)

0
Thanks! zomspi 541 — 4y
0
Even if you change visibility of the frame it would leave that event running. You should have CharacterAppearanceLoaded seperated from if statement and using vaiable to run or not. karlo_tr10 1233 — 4y
Ad

Answer this question