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

surface gui on a specific player

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,

1 answer

For teleporting you only need player for a LocalScript You don't need to get player other wise.

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