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

{SOLVED}What is wrong with this script?

{SOLVED}How can i make a script which makes when members of a specific group join a server , their team auto change to a specific team , i tried this script :

When.Humanoid.Join
If.local GroupMember = true
local GroupId = 0 -- i wrote a working Id but it didnt work
local GroupRank = 252
then Humanoid.Team = Citizens -- the team name 
end

I am a beginner scripter , so of course my script has a lot of mistakes , please tell me what did i do wrong?{SOLVED}

1 comment

1

Nice logic for a beginner. I salute to your efforts.

2 answers

✓ Accepted answer
game.Players.PlayerAdded:connect(function(Player) 
   if Player:IsInGroup(0) then -- Change the group ID to your group   
Player.TeamColor = BrickColor.new("Bright Red") -- Or whatever the color of team is.
end

So The logic behind this is that it checks whether your in the group or not, if your in the group then it will Place your Team Color into what ever team color you want. Player:IsInGroup() Is method which checks whether or not if your in the group and can find whether or not your in the group

Also Teamcolor is a property of the player which can be changed by changing there Team Color Hopes this explains, i'm bad it.

I think this method will help alot, http://wiki.roblox.com/index.php/IsInGroup_(Method)

1 comment

0

thanks a lot

so according to your script a person at that group with a rank of 252 teams in to civilians

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