Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
Any way would work. I have looked everywhere online. A step on brick to go to this team, or a choose spawn/team GUI…Anything! |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
b1 |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
b2 |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
b3 |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
b4 |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
b5 |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
b7 |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
b6 should be b7 |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
b8 |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
b9 |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
b10 |
|
|
local newteam = BrickColor.new("Color here");
script.Parent.Touched:connect(function(h)
if h.Parent and h.Parent.Humanoid then
local p = game.Players:getPlayerFromCharacter(h.Parent);
if p then
p.TeamColor = newteam;
end;
end;
end); |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
Paste that into the brick that I use for team choosing? Or do I just put that script into workspace? |
|
|
Put that into a script that's in a brick.
Workspace --> Brick --> Script |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
Does not work. For the "Color Here" I put Navy Blue (team color) but when I step on that brick, I do not go to that team. |
|
|
Since you want "Anything", I'll give you something so here you go,
Teams = game.Teams:GetChildren()
TeamSelector = math.random[1, #Teams]
TeamChosen = Teams[TeamSelector]
game.Players.PlayerAdded:connect(function(Player)
Player.TeamColor = BrickColor.new(TeamChosen.TeamColor)
end) |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
Im a noob so what do I do with that script lol? |
|
|
Once a player joins, it would basically just randomly select a team for them based on the available teams. |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
I don't want it to be random. I want a Team Choosing GUI or I want a script that you put into a brick where when you touch that brick, you go to a specific team. |
|
|
Place this in something such as a TextButton,
script.Parent.MouseButton1Click:connect(function(Clicker)
Player = game.Players:FindFirstChild(Clicker.Name)
Clicker.TeamColor = BrickColor.new("TeamColorHere)
end) |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
So create a GUI, add a text button, and insert into the text button? |
|
|
Insert a script into the TextButton and add that inside the script. |
|
QuasiduckJoin Date: 2008-09-28 Post Count: 2437 |
Why not just use a spawnlocation and set AllowTeamChangeOnTouch to true? |
|
Cheeso135Join Date: 2013-04-13 Post Count: 2016 |
GUI does not work. Just tell me step by step (please) how to make it so that when a brick is touched, you go to a specific team. |
|
|
Alright
Part = game.Workspace.Part
--We create a variable which now contains the value of a path leading directly to the brick named "Part" in Workspace.
Part.Touched:connect(function(Toucher) if Toucher.Parent and Toucher.Parent:FindFirstChild("Humanoid") then
Player = game.Players:FindFirstChild(Toucher.Parent.Name)
Player.TeamColor = BrickColor.new(TeamColorHere)
end
end)
--We used the .Touched:connect() event to create a brand new function, we then use if statements to check whether the part touching the brick has a parent and if the parent has a humanoid if it does then we use the FindFirstChild() method to see if a player matches the parent's name in players, if it does then we set that player's TeamColor to the BrickColor matching that specific team. |
|