Logitech
|
  |
| Joined: 10 May 2007 |
| Total Posts: 1813 |
|
|
| 01 Aug 2013 01:55 PM |
| Changes to a different colour depending on team when A team member touches a brick. Can some one give me some tips on how to do that? |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2013 01:59 PM |
Make a script in Workspace and put the gui in the script with a localscript in the gui Make the regular script have this code: game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:wait(); script.GUI_NAME:clone().Parent = plr.PlayerGui end)
Then in the localscript have a while wait() do end loop Just have it check the player's team and make the color the team color
~Professional ROBLOX Human |
|
|
| Report Abuse |
|
|
Logitech
|
  |
| Joined: 10 May 2007 |
| Total Posts: 1813 |
|
| |
|
Logitech
|
  |
| Joined: 10 May 2007 |
| Total Posts: 1813 |
|
|
| 01 Aug 2013 02:14 PM |
| Wait The GUI Colours are Hexadecimal How does that work if the Players team colours are set to Numerical Values? |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2013 02:16 PM |
| The colors of GUIs are Color3 values, to change the teamcolor to color3 use plyr.TeamColor.Color |
|
|
| Report Abuse |
|
|
Logitech
|
  |
| Joined: 10 May 2007 |
| Total Posts: 1813 |
|
|
| 01 Aug 2013 09:31 PM |
I have this now
StatusC = Workspace.StarterGui.Teams.Frame.C
function onTouch(hit) local user = game.Players:GetPlayerFromCharacter(hit.Parent) if user ~= nil then
StatusC.BackgroundColor3 = user.TeamColor.Color
end end
script.Parent.Touched:connect(onTouch)
Its not working though |
|
|
| Report Abuse |
|
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 01 Aug 2013 09:36 PM |
| You have to change the PlayerGui, not the StarterGui |
|
|
| Report Abuse |
|
|
Logitech
|
  |
| Joined: 10 May 2007 |
| Total Posts: 1813 |
|
|
| 01 Aug 2013 09:47 PM |
StatusC = Workspace.PlayerGui.Teams.Frame.C
function onTouch(hit) local user = game.Players:GetPlayerFromCharacter(hit.Parent) if user ~= nil then
StatusC.BackgroundColor3 = player.TeamColor.Color
end end
script.Parent.Touched:connect(onTouch)
not working I think my parents are wrong |
|
|
| Report Abuse |
|
|
Logitech
|
  |
| Joined: 10 May 2007 |
| Total Posts: 1813 |
|
| |
|
Desperian
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 3371 |
|
|
| 02 Aug 2013 08:33 AM |
| Since when was a player's PlayerGui in Workspace? Unless you've simply named a model, or similar 'PlayerGui'. |
|
|
| Report Abuse |
|
|
Logitech
|
  |
| Joined: 10 May 2007 |
| Total Posts: 1813 |
|
|
| 02 Aug 2013 08:36 PM |
function onTouch(hit) local user = game.Players:GetPlayerFromCharacter(hit.Parent) if user ~= nil then
Players.Player.PlayerGui.Teams.Frame.C = player.TeamColor.Color
end end
script.Parent.Touched:connect(onTouch)
Now Need some help to change the Properties of C. C being the Text Box that I want to change. The Property that I want to change is BackgroundColor . What lines should I add?
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 02 Aug 2013 08:37 PM |
replace Players.Player with user |
|
|
| Report Abuse |
|
|
Logitech
|
  |
| Joined: 10 May 2007 |
| Total Posts: 1813 |
|
|
| 02 Aug 2013 08:42 PM |
| Thanks CNT Still need to change the properties |
|
|
| Report Abuse |
|
|