I have tried creating a table and adding player names into it when they join and removing it when they leave, however that hasn't worked. Can anyone tell me how I would make the webhook print every player in game's name?
local players = {}
local url = ""
local http = game:GetService('HttpService')
game.Players.PlayerAdded:Connect(function(p)
table.insert(players, p.Name)
end)
game.Players.PlayerRemoving:Connect(function(p)
local finder = table.find(players, p.Name)
if finder then
table.remove(players.p.Name)
end
end)
p.Chatted:Connect(function(msg)
if msg == ":players" then
local data = {
["content"] = players -- I know this won't work, I've tried other methods but they also do nothing.
http:PostAsync(url, http:JSONEncode(data))
end
end)
