my script is hundreds of lines, but once I get to the part where I change walkspeed back to 16 (i changed it to 0 before using this code -

game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0

and when I try changing it back the game breaks. here is a piece of my code, before and after it breaks -

					wait(3)
					setText(" ")
					game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
					game.Players.LocalPlayer.PlayerGui.ScreenGui.Enabled = false
                    delay(3, function()

i have a wait, then set text. I then change the walkspeed back (this is when the whole game stops in studio) the transparency of the gui then tweens out, which I didn't include here since it's 3 lines long in here, and then i disable the gui. the delay(3, function() is part of my touch event.

any help would be appreciated, thank you

4 comments

1

It's really not reccomended to set a player's walkspeed via localScript

0

Is that part of code even running? Looks all good to me, if it did not work it means it's not running. Try adding prints to debug it.

0

/\ do the above because if it doesn't print then the script is creating an error somewhere or the script isn't actually running

0

i moved the walkspeed line of the code and now it works, but now, the line that it originally on doesn't work which is the tween background transparency. i need to use a local script for timing, and when I get to that point in the code it opens the script and says "Rendering paused for debugging."