generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: What's wrong with this script?

Previous Thread :: Next Thread 
XenithX2 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. XenithX2
Joined: 28 Mar 2013
Total Posts: 136
05 Jun 2016 10:06 AM
Bump
Report Abuse
lululukas is not online. 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 is not online. 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 is not online. XenithX2
Joined: 28 Mar 2013
Total Posts: 136
05 Jun 2016 10:54 AM
It still stays lit
Report Abuse
lululukas is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image