Hello, great community.
The script that I'm wanting to make is simply that I choose some friends to get some powers on my game when they join. But it seems that Roblox doesn't recognize the table and doesn't fire the loop to my friends. I don't get anything on the output, it just doesn't do anything.
Friends = {"Roblox";"MasterRoblox43";"silversiverbas"}
game.Players.PlayerAdded:Connect(function(a)
print("Checking "..a.Name) -- It only prints.
for i,v in pairs (game.Players:GetChildren()) do
if v.Name == Friends then
for i = 1,3 do
-- Code of the powers
end
end
end
end)
What am I doing wrong, I think it's the table or the if v.Name == Friends then I'm not sure, if you know the issue, please let me know.
In the output, it only prints the print("Checking "..a.Name) but when my friends join it just say "check Friend name" and don't fire the loop that how it's supposed to be.

1 comment
Thanks for the nice quality of the answer, really helped me alot, thanks man!