For first, you dont need to use script.Parent.Parent, only use "game"
example:
game.Players:FindFirstChild("...")
also your FindFirstChild is incorrect, you need to use a string. example:
workspace:FindFirstChild("Part")
and is not a good way to use a loop to check, you can detect on player added make this.
example:
game.Players.PlayerAdded:Connect(function(player)
print("the player: " .. player.Name .. " joined!")
end)
also you can use a table and a generic for loop to make developers.
example:
local teams = game:GetService("Teams")
local team = teams:FindFirstChild("Developer")
local Players = game:GetService("Players")
local developers = {"JakePlays_TV"}
Players.PlayerAdded:Connect(function(player)
for _,devName in pairs(developers) do
if devName == player.Name and team then
player.Team = team
end
end
end)
Hope it helped :)
1 comment
Developer should also be a string