I am changing a GUI TextLabel and it is not changing for some reason. In other words, I need help.
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 1 while true do local speed = game.Players.LocalPlayer.Character.Humanoid.WalkSpeed print(speed) if speed > 0 then game:GetService("StarterGui").ScreenGui.TextLabel.Text = "NOT FROZEN" local Random = math.random(1,200) if Random < 199 then speed = speed + math.random(1,3) wait(1) else speed = 0 wait(1) end else game:GetService("StarterGui").ScreenGui.TextLabel.Text = "FROZEN" wait(30) game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 1 end end
I now I cannot use the variable speed in some parts but If I do not the whole thing shows horribly. I hope you can help!
Use game.Players.LocalPlayer.PlayerGui starter gui is the gui for every player that joins
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 1 while true do local speed = game.Players.LocalPlayer.Character.Humanoid.WalkSpeed print(speed) if speed > 0 then game.Players.LocalPlayer.PlayerGui.ScreenGui.TextLabel.Text = "NOT FROZEN" local Random = math.random(1,200) if Random < 199 then speed = speed + math.random(1,3) wait(1) else speed = 0 wait(1) end else game.Players.LocalPlayer.PlayerGui.ScreenGui.TextLabel.Text = "FROZEN" wait(30) game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 1 end end