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

Follow a Friend GUI?

Asked by 8 years ago
Edited 8 years ago

So i need help making a follow a friend GUI for my popular game Delitive Mod, I have this chunk of code provided by TheLowOne, but I am unsure how to transcript it to make it GUI compatible. Here's the code:

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

`

I started to configure it a little bit but it was a null attempt, someone please help! Thanks! Also, credit will be given.

0
commenting for later Prioxis 673 — 8y
0
Helpful.... Connor_1 3 — 8y
2
line 025: should be tp:GetPlayerPlaceInstanceAsync(userId). Perhaps, try that. Sxerks3 65 — 8y

1 answer

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

This assumes that the script is the child of a TextButton

Edit: Fixed line 32

You would just have to supply the current player and the user id of the player to follow on line 32

01--The whole script has not been tested, change it your likings
02function GetFriends(player) --I do not feel like upvaluing it
03    return player:GetFriendsOnline(200) --max is 200
04end
05function GetFriendsInGame(friends)
06    local new_friends = {} --dont mean it like thatl
07    local placeid = game.PlaceId
08    local temp
09    for x = 1, #friends do
10        temp = friends[x]
11        if (temp.IsOnline) then
12            if (temp.PlaceId == placeid) then
13                new_friends[#new_friends + 1] = temp
14            end
15        end
View all 32 lines...
0
This wasn't tested shadownetwork 233 — 8y
0
uh this answer was given 6 months after the question was asked. phxtn 154 — 7y
Ad

Answer this question