|
| 11 Apr 2012 07:35 PM |
How do i make tools go to specific teams Please help me out. |
|
|
| Report Abuse |
|
|
L2000
|
  |
| Joined: 03 Apr 2008 |
| Total Posts: 77448 |
|
|
| 11 Apr 2012 07:42 PM |
if player.TeamColor == WantedTeamColor then tool:Clone().Parent = player end
That's the basic syntax of it. |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 07:50 PM |
where does the tool get cloned from. The lighting? |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 07:52 PM |
You decide. L2 gave you the basic concepts of it.
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 07:56 PM |
Bright blue or Bright blue team eh im sure i will figure it out now. thank you |
|
|
| Report Abuse |
|
|
toamini
|
  |
| Joined: 28 Jan 2010 |
| Total Posts: 35 |
|
|
| 11 Apr 2012 08:01 PM |
or you can make a giver.... next to the spawn |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 08:36 PM |
| im going to just do the giver its less neat but it will work |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 11 Apr 2012 08:38 PM |
| I have a plugin. Hold on, let me get it.. |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 11 Apr 2012 08:41 PM |
self = PluginManager():CreatePlugin() toolbar = self:CreateToolbar("TeamCreate") button = toolbar:CreateButton("", "TeamCreate", "Team.png") mouse = self:GetMouse() button.Click:connect(function() local team = Instance.new("Team") local main = Instance.new("ScreenGui", game.CoreGui) local frame = Instance.new("Frame", main) frame.Size = UDim2.new(.5, 0, .5, 0) frame.Position = UDim2.new(.25, 0, .25, 0) frame.Style = "RobloxRound" local nameL = Instance.new("TextLabel", frame) nameL.Size = UDim2.new(.1, 0, .1, 0) nameL.BackgroundTransparency = 1 nameL.TextColor = BrickColor.new("White") nameL.Font = "ArialBold" nameL.FontSize = "Size18" nameL.Text = "Name: " local nameA = Instance.new("TextBox", frame) nameA.Size = UDim2.new(.7, 0, .1, 0) nameA.Position = UDim2.new(.1, 0, 0, 0) nameA.BackgroundColor = BrickColor.new("White") nameA.TextColor = BrickColor.new("Really black") nameA.TextXAlignment = "Left" nameA.Font = "ArialBold" nameA.FontSize = "Size18" nameA.Text = "TeamName" nameA.Changed:connect(function() team.Name = nameA.Text end) local createB = Instance.new("TextButton", frame) createB.Size = UDim2.new(.1, 0, .1, 0) createB.Position = UDim2.new(.8, 0, 0, 0) createB.Style = "RobloxButtonDefault" createB.TextColor = BrickColor.new("White") createB.Font = "ArialBold" createB.FontSize = "Size14" createB.Text = "Create" local cancelB = createB:clone() cancelB.Parent = frame cancelB.Position = UDim2.new(.9, 0, 0, 0) cancelB.Text = "Cancel" cancelB.MouseButton1Down:connect(function() main:remove() end) local frameC = Instance.new("Frame", frame) frameC.Size = UDim2.new(.5, 0, .9, 0) frameC.Position = UDim2.new(0, 0, .1, 0) frameC.Style = "RobloxRound" local color = Instance.new("TextButton") color.Size = UDim2.new(1/8, 0, 1/8, 0) color.BorderSizePixel = 0 color.Text = "" for x = 0, 7 do for y = 0, 7 do local e = color:clone() e.Parent = frameC e.Position = UDim2.new(x/8, 0, y/8, 0) e.BackgroundColor = BrickColor.palette(x + y*8) e.MouseButton1Down:connect(function() team.TeamColor = e.BackgroundColor end) end end local frameT = Instance.new("Frame", main) frameT.Size = UDim2.new(.1, 0, .45, 0) frameT.Position = UDim2.new(.15, 0, .3, 0) frameT.Style = "RobloxRound" local labelT = Instance.new("TextLabel", main) labelT.Size = UDim2.new(.1, 0, .05, 0) labelT.Position = UDim2.new(.15, 0, .25, 0) labelT.BackgroundTransparency = 1 labelT.TextColor = BrickColor.new("White") labelT.Font = "ArialBold" labelT.FontSize = "Size18" labelT.Text = "Tools" local tool = Instance.new("TextButton") tool.Size = UDim2.new(1, 0, .05, 0) tool.TextColor = BrickColor.new("White") tool.Font = "ArialBold" tool.FontSize = "Size14" local tools = {} function findTools(place) for _, v in ipairs(place:GetChildren()) do if v:IsA("Tool") or v:IsA("HopperBin") then table.insert(tools, v) end findTools(v) end end findTools(game:GetService("Lighting")) local buttons = {} for _, v in ipairs(tools) do local e = tool:clone() e.Parent = frameT e.Position = UDim2.new(0, 0, (_-1)*.05, 0) e.Text = v.Name e.Style = Enum.ButtonStyle.RobloxButton table.insert(buttons, e) e.MouseButton1Down:connect(function() if e.Style == Enum.ButtonStyle.RobloxButton then e.Style = Enum.ButtonStyle.RobloxButtonDefault e.TextColor = BrickColor.new("Bright red") else e.Style = Enum.ButtonStyle.RobloxButton e.TextColor = BrickColor.new("White") end end) end createB.MouseButton1Down:connect(function() team.Parent = game:GetService("Teams") for _, v in ipairs(buttons) do if v.Style == Enum.ButtonStyle.RobloxButtonDefault then tools[_]:clone().Parent = team end end main:remove() end) local starter = workspace:findFirstChild("TeamPack") or Instance.new("Script", workspace) starter.Name = "TeamPack" starter.Source = [[ workspace.ChildAdded:connect(function(c) local player = game.Players:playerFromCharacter(c) if player then for _, v in ipairs(game:GetService("Teams"):GetChildren()) do if v.TeamColor == player.TeamColor then for _, a in ipairs(v:GetChildren()) do if a:IsA("Tool") or a:IsA("HopperBin") then a:clone().Parent = player.Backpack end end end end end end) ]] end) |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 08:43 PM |
| i put my tool in a giver but it just goes right back to the starter pack? |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 11 Apr 2012 08:44 PM |
| Put the tools in Lighting and use the plugin. |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 08:57 PM |
| Heyy did you used to have a game on the Top page? |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 08:58 PM |
| ive never used one does it go in the command or a script |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 11 Apr 2012 08:59 PM |
Pokemon Adoption 1waffle1 Obby Money Tycoon Blob Tycoon Hide & Seek: Wintery Underworld Laser Tanks Laser Tanks 2.0
Oldest - Newest |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 09:12 PM |
ive played laser tanks before and you are exactly who i need im trying to make a game with min planets and space ships as units. and i made a tool to control them my problem is i dont want enemy teams controling eachothers ships so there needs to be a tool for each team could you tell me how to write this: the tools name is Position and the teams are bright red and bright blue |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 11 Apr 2012 09:13 PM |
| Put a BrickColorValue in each of the units and check if it's value matches the Player's TeamColor. |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 09:22 PM |
| i changed it now i will test it amigo. |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 09:28 PM |
i already gave them both intvalues and the blueteam tool can move the ones valued 1 and the redteam tool can move the ones valued 2 the problem is both teams spawn with both tools. brickcolorvalue didnt do anything. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 12 Apr 2012 06:50 AM |
local teams={ ["Bright blue"]={ game.Lighting.Weapons.Sword; game.Lighting.Weapons.Shield }; ["Bright red"]={ game.Lighting.Weapons.Katana } }
game.Players.PlayerAdded:connect(function(plr)) plr.CharacterAdded:connect(function(char)) if teams[plr.TeamColor.Name] then local team=teams[plr.TeamColor.Name] for i,w in pairs(team) do w:Clone().Parent=plr.Backpack end end end) end) |
|
|
| Report Abuse |
|
|