Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

SurfaceGUI script works in Test mode, Not in play mode?

Asked by 8 years ago

Here is my code, It's on a surfaceGUI and teleports the player to another game, Works fine in Test mode as stated.

1button = script.Parent
2button.MouseButton1Down:connect(function () 
3plrgui = button.Parent.Parent
4player = plrgui.Parent
5id = '411830270'
6game:GetService('TeleportService'):Teleport(id, player)
7end)
0
is it a localScript? theCJarmy7 1293 — 8y
0
It was a normal script, I changed it to local would not work in Test mode or Play mode WorldEngine 2 — 8y

Answer this question