local TeleportService = game:GetService("TeleportService") local gameID = 1276220417 function onTouched() local player = Clicked.Parent TeleportService:Teleport(gameID, player) end script.Parent.MouseButton1Click:connect(onTouched)
the local player doesnt work on it, any ideas?
To reference the local player you do this
local player = game.Players.LocalPlayer
I’m not completely sure about this but I think you have to set a variable for the player using local player instead of clicked.Parent but when you are using the variable for teleporting put .UserId after it.