It just started working again... Out of nowhere...
Is there any output?
Also, sometimes KeyDown() doesn't work too well. Switch it with KeyUp() just to see if anything happens.
Try instead of string.byte(key) == 27
do key:lower() == string.char(27)
, and try adding a repeat
loop, for instance, repeat wait(0)until game.Players.LocalPlayer and game.Players.LocalPlayer:GetMouse()
, that will keep repeat waiting until those two are not equal to nil.
Edited: Your script will turn out something like this;
repeat wait(0)until game.Players.LocalPlayer and game.Players.LocalPlayer:GetMouse() MyMouse = game.Players.LocalPlayer:GetMouse() Player = game.Players.LocalPlayer MyMouse.KeyDown:connect(function(key) if key:lower() == string.char(27) then script.Parent.Frame.Visible = true script.Parent.TextLabel.Visible = false script.Parent.Frame.Play.Script.Disabled = false Player.CameraMode = "Classic" end end)