Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does this work for other players but not me? (The owner)

This spawns everyone in the group to the right team but me? Why?

function Enter(newPlayer) if newPlayer:IsInGroup(2608221) then newPlayer.TeamColor = script.Parent.TeamColor end game.Players.ChildAdded:connect(Enter)

1 comment

0

You should fix your hierarchy.

1 answer

Question: Where is the script placed?

Missed Things:

'end' required at the end of if function 'if newPlayer:IsInGroup(2608221) then'

Optional:

Consider changing 'ChildAdded' for 'PlayerAdded'

Script

I have not tested this script, give it a go, reply if it works!

function Enter(newPlayer) 
wait()
if newPlayer:IsInGroup(2608221) then 
	newPlayer.TeamColor = script.Parent.TeamColor 
end 
end
game.Players.PlayerAdded:connect(Enter)

This discussion is preserved as it was. New answers, comments, and votes are closed.