I want to make a script in a surface gui that teleports you to a different game but the problem is my script only works in solo mode
function click (hit) game:GetService("TeleportService"):TeleportToSpawnByName(149751872, "NameofSpawn", player) end script.Parent.MouseButton1Down:connect (click)
I think the problem is it doesn't know how to assign itself to a player but I don't know how to do that
Thanks,
Exsius,
For teleporting you only need player for a LocalScript
You don't need to get player other wise.