Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 10 years ago

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

Log in to vote
0
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

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

0
Ah Thanks a ton. I hope it works. DerpyShadowz 34 — 10y
0
It works. Thanks. DerpyShadowz 34 — 10y
Ad

Answer this question