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:
02 | function GetFriends(player) |
03 | return player:GetFriendsOnline( 200 ) |
05 | function GetFriendsInGame(friends) |
06 | local new_friends = { } |
07 | local placeid = game.PlaceId |
09 | for x = 1 , #friends do |
11 | if (temp.IsOnline) then |
12 | if (temp.PlaceId = = placeid) then |
13 | new_friends [ #new_friends + 1 ] = temp |
21 | function FollowFriend(player, userId) |
24 | local tp = game:GetService( "TeleportService" ) |
25 | local success, emsg, placeId, instanceId = tp:GetPlayerPlaceInstanceAync(userId) |
27 | tp:TeleportToPlaceInstance(placeId, instanceId, player) |
29 | script.Parent.JoinAFriend.Text = "Offline" |
32 | script.Parent.SearchButton.MouseButton 1 Down:connect(FollowFriend) |
`
I started to configure it a little bit but it was a null attempt, someone please help! Thanks! Also, credit will be given.