HazorJoin Date: 2009-02-09 Post Count: 5804 |
I need a script that puts Rat Members on the "Rat Member" Team at my fort, and none of the scripts I have tried work... Any suggestions?
|
|
HPtopiaJoin Date: 2011-01-09 Post Count: 369 |
Use the IsInGroup function. |
|
HazorJoin Date: 2009-02-09 Post Count: 5804 |
Here is one of the scripts I tried.
game.Players.PlayerAdded:connect(function(Plyr)
if Plyr:IsInGroup(7013) then
Plyr.Team = "Rat Members"
end
end
It didn't work. |
|
darkboedaJoin Date: 2009-04-26 Post Count: 3724 |
Rat Members has a space, To make it work make it ["Rat Members"]
Im not that good but i think i got this right :D |
|
|
player.Team is a BrickColor value, and the name comes from the "Team" object that has the same colour. |
|
HazorJoin Date: 2009-02-09 Post Count: 5804 |
Grr. It's still not working... Does the Auto Assign property on the teams matter? I have it turned off for Rat Members... |
|
HazorJoin Date: 2009-02-09 Post Count: 5804 |
BrandonHare, so your suggesting I Change it from Plyr.Team = "Rat Members"
to Plyr.TeamColor = "Black"? |
|
dudepop34Join Date: 2008-10-13 Post Count: 1666 |
Yes, that is what he is saying... |
|
|
Not "black", brickColor.new("Black") |
|
HazorJoin Date: 2009-02-09 Post Count: 5804 |
game.Players.PlayerAdded:connect(function(Plyr)
if Plyr:IsInGroup(7013) then
Plyr.TeamColor = brickColor.new("Black")
End
Still not working..... |
|
|
game.Players.PlayerAdded:connect(function(Plyr)
if Plyr:IsInGroup(7013) then
Plyr.TeamColor = BrickColor.new("Black")
end
end) |
|
|
HPtopiaJoin Date: 2011-01-09 Post Count: 369 |
You have to have the TeamColor, Black. If you don't than use the Instance.new event or insert one to create it. |
|
|
HazorJoin Date: 2009-02-09 Post Count: 5804 |
game.Players.PlayerAdded:connect(function(Plyr)
if Plyr:IsInGroup(7013) then
Plyr.TeamColor = BrickColor.new("Black")
else
Plyr.TeamColor = BrickColor.new("Medium Stone Grey")
end
I added another team, and I'm pretty close to giving up on this script.... |
|
|
For every one of these
-------------------------------
if
function
do
-------------------------------
You will need a end. |
|
HazorJoin Date: 2009-02-09 Post Count: 5804 |
Ah, ok. Cool, thanks for telling me. |
|
HazorJoin Date: 2009-02-09 Post Count: 5804 |
Grr. Still not working... Are you sure this will work? |
|
|
game.Players.PlayerAdded:connect(function(player)
if player:IsInGroup(Put RAT's ID number here) then
player.Team = game.Teams.RatTeam?
end
end)
Now, I'll have you know I don't do much with teams, so I can't really help you much. But I have most of it there for you, just the team part is probably wrong. And put RAT's group ID where I told you. Then just make them whatever team, however you do that. |
|
HazorJoin Date: 2009-02-09 Post Count: 5804 |
Still not working....
|
|
|
game.Players.PlayerAdded:connect(function(Plyr)
if Plyr:IsInGroup(7013) then
Plyr.TeamColor = BrickColor.new("Black")
else
Plyr.TeamColor = BrickColor.new("Medium Stone Grey")
end
end |
|