22:49:25.009 - connect is not a valid member of TextButton
22:49:25.016 - Script 'Players.Player1.PlayerGui.PlayerHUD.bg.PlayerListUpdater', Line 82
22:49:25.018 - Stack End
So, this one threw me for a loop. I don't know how or why.. :/
But here's code.
newSlot.ActivityList.ToggleFriend:connect(function()
if activityDebounce == 0 then
activityDebounce = 1
if newSlot.ActivityList.ToggleFriend.Text == "Add Friend" then
_G.output(player.Name, "sent friend request to", newSlot.Text)
requestFriend:InvokeServer(newSlot.Text)
else
_G.output(player.Name, "is no longer friends with", newSlot.Text)
removeFriend:InvokeServer(newSlot.Text)
end
local friend = isFriend:InvokeServer(newSlot.Text)
_G.output(player.Name, friend)
if friend then
newSlot.ActivityList.ToggleFriend.Text = "Remove Friend"
else
newSlot.ActivityList.ToggleFriend.Text = "Add Friend"
end
activityDebounce = 0
end
end)

2 comments
What is this for? A click?
Because a TextButton is not an event