Teleport to a server a player in

Edited after discussing below.

GetPlayerPlaceInstanceAsync actually returns four things. You’ll need the last two to get the PlaceId and the ServerId. The code is attempting to use a status message as the ServerId.

It’d be wiser to use the returned PlaceId value over game.PlaceId (if I suggested that in the past, my bad). game.PlaceId would just redirect to the current place. Ideally, for a mod call system, you want to use both.

local event_accept = event:FindFirstChild("ModcallAccepted")

function AcceptModcall(plr, userId)

local success, message, targetPlaceId, serverPlayerIn = service:GetPlayerPlaceInstanceAsync(userId)

service:TeleportToPlaceInstance(targetPlaceId, serverPlayerIn, plr)

end

event_accept.OnServerInvoke = AcceptModcall
2 Likes