Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Any ideas why this doesnt work?

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

✓ Accepted answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.