|
| 10 Sep 2012 04:00 PM |
BadgeId = 92417793 local h = script.Parent.Parent.Parent.Parent.Parent function onButtonClicked() if game:GetService("BadgeService"):UserHasBadge(p.userId, BadgeId) then h.TeamColor=BrickColor.new("Bright red") h.Humanoid.Health = 0 wait() end end)
script.Parent.MouseButton1Click:connect(onButtonClicked)
Suppose to make it so when you press the gui, If you have a certain badge then you die and your team goes to bright red. |
|
|
| Report Abuse |
|
|
| |
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
|
| 10 Sep 2012 04:04 PM |
'p' is not defined, and 'h' isn't defined properly either.
I think you mean this:
BadgeId = 92417793 local p = script.Parent.Parent.Parent.Parent.Parent --Check the hierarchy, it should be the Player instance local h = p.Character function onButtonClicked() if game:GetService("BadgeService"):UserHasBadge(p.userId, BadgeId) then h.TeamColor=BrickColor.new("Bright red") h.Humanoid.Health = 0 wait() end end)
script.Parent.MouseButton1Click:connect(onButtonClicked) |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2012 04:14 PM |
| Doesn't work, I checked parents |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Sep 2012 04:25 PM |
| ... Then change the parents to the correct amount.. |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2012 04:27 PM |
| They are at the right amount |
|
|
| Report Abuse |
|
|
| |
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 10 Sep 2012 07:18 PM |
*Claps for bobby* Most helpful person EVER! [/sarcasm] |
|
|
| Report Abuse |
|
|