This script only works in Solo Mode.
local Player = game.Players.LocalPlayer Player.Character.Humanoid.WalkSpeed = 0 local Mouse = Player:GetMouse() Mouse.KeyDown:connect(function(Key) if string.byte(Key) == 32 then Player.Character.Humanoid.Health = 0 elseif string.byte(Key) == 120 then Player.Character.Humanoid.Jump = true elseif string.byte(Key) == 27 and Player.PlayerGui.ScreenGui.Cheat.Visible == false then Player.PlayerGui.ScreenGui.Frame.Visible = true Player.PlayerGui.ScreenGui.Quiter.Visible = false end end)
It won't work in Regular Online mode. Help!
EDIT: Whoever Thumbs down this question probably can't script. This is serious though. The whole rage game revolves around this script. It's all glitchy though. Sometimes it works, and other times it doesn't.
EDIT2: Oops, forgot to say this, This script is a LocalScript
.
Someone else had a similar problem earlier:
local Player = game.Players.LocalPlayer
can only be used in a local script. This script needs to be inside a localscript in the player. (Put it in startergui or clone it into the player using :clone() )
A lot of times, LocalScripts will try to run before the client has actually loaded, so try adding an empty wait to the top.
wait() local Player = game.Players.LocalPlayer Player.Character.Humanoid.WalkSpeed = 0 local Mouse = Player:GetMouse() Mouse.KeyDown:connect(function(Key) if string.byte(Key) == 32 then Player.Character.Humanoid.Health = 0 elseif string.byte(Key) == 120 then Player.Character.Humanoid.Jump = true elseif string.byte(Key) == 27 and Player.PlayerGui.ScreenGui.Cheat.Visible == false then Player.PlayerGui.ScreenGui.Frame.Visible = true Player.PlayerGui.ScreenGui.Quiter.Visible = false end end)