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

{SOLVED}What is wrong with this script?

Asked by 11 years ago

{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 :

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

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
Nice logic for a beginner. I salute to your efforts. OniiCh_n 410 — 11y

2 answers

Log in to vote
2
Answered by
HexC3D 830 Moderation Voter
11 years ago
1game.Players.PlayerAdded:connect(function(Player)
2   if Player:IsInGroup(0) then -- Change the group ID to your group  
3Player.TeamColor = BrickColor.new("Bright Red") -- Or whatever the color of team is.
4end

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)

0
thanks a lot kudorey619 138 — 11y
Ad
Log in to vote
0
Answered by 11 years ago

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

Answer this question