|
| 08 Feb 2012 04:53 PM |
gui.MouseButton1Click:connect(function() -A- end)
---
Where -A- should be is a line that allows me to access the player's data, like TeamColor. Sadly, I don't know how to perform this. Can someone please help me?
-Virtualdarks |
|
|
| Report Abuse |
|
|
C0D3Y
|
  |
| Joined: 24 Jul 2010 |
| Total Posts: 1692 |
|
|
| 08 Feb 2012 05:00 PM |
| A = script.Parent(Text Button).Parent(Frame).Parent(ScreenGUI).Parent(PlayerGUI).Parent(Player) |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 08 Feb 2012 05:05 PM |
If this script is in a LocalScript ( like all tools and gui's should be ) then all you would have to do is
local player=game.Players.LocalPlayer; |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 05:06 PM |
@SDuke524
So:
---
player.TeamColor
---
Would work?
-Virtualdarks |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 08 Feb 2012 05:07 PM |
| Yes. As long as you're using a LocalScript. |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Feb 2012 05:12 PM |
local player = game.Players.LocalPlayer;
gui.MouseButton1Click:connect(function() player.TeamColor = Color3.new(0/255,255/255,255/255) player.Character.Humanoid.Health = 0 end)
---
Is there a reason why that doesn't work?
-Virtualdarks |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 08 Feb 2012 05:49 PM |
1. Make sure that it's in a LocalScript 2. Where is gui defined? 3. Color3.new(0/255,255/255,255/255)==Color3.new(0,1,1) |
|
|
| Report Abuse |
|
|