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

Any ideas why this doesnt work?

Asked by 9 years ago

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 
03script.Parent.MouseButton1Click:connect(function()
04    local Level1 = script.Parent
05 
06    if Level1.Visible == true then
07        game:GetService("TeleportService"):Teleport(284418914, player)     
08    end
09 
10end)

1 answer

Log in to vote
0
Answered by 9 years ago

Conveniently, I was just having the same issue. I fixed it by putting the code into a LocalScript instead of a regular one.

Ad

Answer this question