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

Team script - What to do for a person not in a group? [Solved]

So I want to know how to make a script for a person who is not in my group. I've designated that group as Enemies/Neutral and put their team colour as red.

Would this work? Or do I need to do something else?

function Enter(newPlayer)
if newPlayer:IsNotInGroup(469670) then -- I have a feeling the IsNotInGroup is wrong.
	newPlayer.TeamColor=script.Parent.TeamColor
	end 
end


game.Players.ChildAdded:connect(Enter)

Anyway thanks.

1 answer

✓ Accepted answer

IsNotInGroup() does not exist, but since IsInGroup() returns a bool value, you can do this: if not newPlayer:IsInGroup()

2 comments

0

Ah Thanks a ton. I hope it works.

0

It works. Thanks.

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