I’ve never used this method before. “The one that you are trying to use”
But if you really want all players in the game in one list, then I would just make a function that adds a player to the list or deletes them when they leave or join the game.
If you don’t know how to do this, I can make a mock script.
local Allies = {}
function RefreshAllyList(plr)
if table.find(Allies,plr) then
table.remove(Allies,table.find(Allies,plr))
else
table.insert(Allies,plr)
end
print(Allies)
end
game.Players.PlayerAdded:Connect(RefreshAllyList)
game.Players.PlayerRemoving:Connect(RefreshAllyList)
This should notice when a player is added or remove from the game, then try to update the list
I think I have the refreshing part is down, just I need it to get all the players in the game(instead of localplayer which is one player) and make them into the ally list.
I mean I already have the part where it refreshes. just I need it to get all the players in the game(instead of localplayer which is one player) and make them into the ally list.
This is the part I’m having trouble on.
This what I just posted solved it. I was looking at how to get it on youtube, your script did work just it was hard to configure with my ai. But thank you so much for trying!