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 8 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?

-- Made by Director1406

script.Parent.MouseButton1Click:connect(function()
    local Level1 = script.Parent

    if Level1.Visible == true then
        game:GetService("TeleportService"):Teleport(284418914, player)      
    end 

end)

1 answer

Log in to vote
0
Answered by 8 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