This is the code:
script.Parent.MouseButton1Click:connect(function() local plr = game:GetService("Players").LocalPlayer plr.PlayerGui.ScreenGui.Frame1.Visible = true end)
It works well in studio but it does not work in game.
The error says: Workspace.MainSreen.SurfaceGui.HackButton.Script:3: attempt to index local 'plr' (a nil value)
Can anyone help? Thank you!
This is inside a normal script, which is inside a SurfaceGui TextButton.
If you would like to contact me to go check it out in team create, please tell me.