XenithX2
|
  |
| Joined: 28 Mar 2013 |
| Total Posts: 136 |
|
|
| 05 Jun 2016 04:55 AM |
while true do script.Parent.PointLight.Brightness = 100
if script.Parent.Transparency = script.Parent.Transparency * Transparency = 0 then script.Parent.Pointlight.Brightness = 0 else wait(1)
script.Parent.PointLight.Brightness = 0
wait(1) end
This script is basically a blinking brick but in another script, when someone touches it, the transparency goes to 0 so when the transparency goes to 0, I want the player to not see the pointlight but if the transparency is not 0, then i want the player to see the pointlight. any advice on how to fix it? Ill appreciate it. |
|
|
| Report Abuse |
|
|
XenithX2
|
  |
| Joined: 28 Mar 2013 |
| Total Posts: 136 |
|
|
| 05 Jun 2016 04:57 AM |
The original script was while true do script.Parent.PointLight.Brightness = 100
wait(1)
script.Parent.PointLight.Brightness = 0
wait(1) end |
|
|
| Report Abuse |
|
|
XenithX2
|
  |
| Joined: 28 Mar 2013 |
| Total Posts: 136 |
|
|
| 05 Jun 2016 04:58 AM |
| I want either the brightness to go 0 or the pointlight to be removed when the transparency of the part is 0 |
|
|
| Report Abuse |
|
|
davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
|
| 05 Jun 2016 05:07 AM |
just set the brightness to 100 as default and when some1 touches it then make the light.Enabled property to false. And if the transparency isnt 0 then enable it again.
|
|
|
| Report Abuse |
|
|
XenithX2
|
  |
| Joined: 28 Mar 2013 |
| Total Posts: 136 |
|
|
| 05 Jun 2016 05:11 AM |
| It's actually a tycoon button. So when someone steps on the tycoon button, the buttons transparency goes to 0, not removed as i seen in the scripts of the tycoon kit. So I don't want someone going back and accidently touching an invisible part and it lights up again. |
|
|
| Report Abuse |
|
|
XenithX2
|
  |
| Joined: 28 Mar 2013 |
| Total Posts: 136 |
|
| |
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 05 Jun 2016 10:29 AM |
script.Parent.PointLight.Brightness=100
script.Parent.Changed:connect(function(prop) if prop==Transparency then if script.Parent.Transparency==0 script.Parent.PointLight.Brightness=0 end end end) |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 05 Jun 2016 10:30 AM |
forgot a then
script.Parent.PointLight.Brightness=100
script.Parent.Changed:connect(function(prop) if prop==Transparency then if script.Parent.Transparency==0 then script.Parent.PointLight.Brightness=0 end end end) |
|
|
| Report Abuse |
|
|
XenithX2
|
  |
| Joined: 28 Mar 2013 |
| Total Posts: 136 |
|
| |
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 05 Jun 2016 11:10 AM |
Well from your script that's what you want it to do....
Here, be more clear next time.
script.Parent.PointLight.Brightness=100
script.Parent.Changed:connect(function(prop) if prop==Transparency then if script.Parent.Transparency==1 then script.Parent.PointLight.Brightness=0 end end end)
|
|
|
| Report Abuse |
|
|
XenithX2
|
  |
| Joined: 28 Mar 2013 |
| Total Posts: 136 |
|
|
| 05 Jun 2016 11:45 AM |
| It was a fatal error, no need to bash me for it. |
|
|
| Report Abuse |
|
|