I made a script, which works while testing through studio, but when I get in the actual game, it doesn't. Any ideas?
01 | -- Made by Director1406 |
02 |
03 | script.Parent.MouseButton 1 Click:connect( function () |
04 | local Level 1 = script.Parent |
05 |
06 | if Level 1. Visible = = true then |
07 | game:GetService( "TeleportService" ):Teleport( 284418914 , player) |
08 | end |
09 |
10 | end ) |
Conveniently, I was just having the same issue. I fixed it by putting the code into a LocalScript instead of a regular one.