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

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

2 answers

Log in to vote
2
Answered by
HexC3D 830 Moderation Voter
10 years ago
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)

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

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

Answer this question