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

Help w/ making a follow friends GUI?

Asked by 8 years ago

I'm working on a Place Teleport gui and I'm having trouble finding the resources I need to enable a player to join a friends server. So far I have the basic teleport from place to place, however I'm having trouble figuring out how to follow friends playing the same game. Could someone please post a link to the wikia or somewhere that explains how to do this?

0
I'm not sure this is possible. User#11440 120 — 8y
0
This is possible in Swordburst Online and i have used it. I think you need to know the other players id to teleport but apart from that i cannot help :c User#5423 17 — 8y

1 answer

Log in to vote
2
Answered by 8 years ago
Edited 8 years ago

You need to use GetFriendsOnline, GetPlayerPlaceInstanceAsync, and TeleportToPlaceInstance

This is an example of what you could do

01--The whole script has not been tested, change it your likings
02 
03function GetFriends(player) --I do not feel like upvaluing it
04    return player:GetFriendsOnline(200) --max is 200
05end
06 
07function GetFriendsInGame(friends)
08    local new_friends = {} --dont mean it like thatl
09    local placeid = game.PlaceId
10    local temp
11    for x = 1, #friends do
12        temp = friends[x]
13 
14        if (temp.IsOnline) then
15            if (temp.PlaceId == placeid) then
View all 40 lines...

Cite: GetPlayerPlaceInstanceAsync GetFriendsOnline TeleportToPlaceInstance

0
god danget, I never get links to work TheLowOne 85 — 8y
0
Thanks, gonna work on this! I'll let you know if I have any trouble. OneTruePain 191 — 8y
Ad

Answer this question