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

Making a script to follow friends?

Asked by 8 years ago
Edited 8 years ago

I'm aware of this script on the wiki that lets you follow friends:

function followPlayer(player, targetUserId )
    local success, errorMsg, placeId, instanceId = game:GetService'TeleportService':GetPlayerPlaceInstanceAsync(targetUserId)
    if success then
        game:GetService'TeleportService':TeleportToPlaceInstance(placeId, instanceId, player)
    else
        print("Teleport error:", errorMsg)
    end
end

However, this script only works on following a user in the current game, not with universes' teleport place. What do I need to change?

Answer this question