I have a loading screen and when you click "Load Game" it should teleport you to a game. But the problem is, it gives me an error saying
"Invalid player to teleport" when I play it in game but when I try it in studio, it works perfectly fine
script
par = script.Parent.Parent
function onClicked()
script.Parent:Destroy()
par["Start Game"]:Destroy()
par.ImageLabel.Image = "rbxgameasset://Images/Orange"
game:GetService("TeleportService"):Teleport(961702140, game.Players.LocalPlayer)
end
script.Parent.MouseButton1Click:connect(onClicked)

2 comments
is it a local script?
oh wait.... XD it's a server script