Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

surface gui on a specific player

Asked by
Exsius 162
10 years ago

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

Log in to vote
0
Answered by 10 years ago

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

Ad

Answer this question