|
| 22 Dec 2013 10:15 AM |
game.Players.PlayerAdded:connect(function(p) if game:GetService("BadgeService"):UserHasBadge(p.userId,106476791) then script.Parent.BackgroundColor3 = Color3.new(0, 255, 0) end)
|
|
|
| Report Abuse |
|
|
|
| 22 Dec 2013 10:19 AM |
One thing is that Color3.new is in decimal, so you need to divide each by 255! (except 0 obviously). Also, you forgot an end to end the if statement.
game.Players.PlayerAdded:connect(function(p) if game:GetService("BadgeService"):UserHasBadge(p.userId,106476791) then script.Parent.BackgroundColor3 = Color3.new(0, 255/255, 0) end end) |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2013 10:20 AM |
| why not zero? dividing by zero is *perfectly* fine. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2013 10:20 AM |
| Alright, thanks for the help! |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2013 10:24 AM |
@Digitalizing Yeah, I know, but it isn't needed. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2013 10:32 AM |
| Hmm strange it still doesn't work. It's supposed to be a red TextLabel that turns green when you own a certain badge. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2013 10:33 AM |
| However, it stays red even though I own the badge. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2013 10:39 AM |
| Are you testing it on "Test" or online "Play"? |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Dec 2013 10:42 AM |
Output is also empty when I try it in Test mode.
In Play mode nothing happens either. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|