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
 

Help

Previous Thread :: Next Thread 
Mariokillsyou645 is not online. Mariokillsyou645
Joined: 22 Aug 2011
Total Posts: 129
06 Jun 2015 10:34 AM
check = script.Parent.Parent.Transparency == 1

if check then
script.Parent.Enabled = false
else
print("Checked")
script.Pulse.Disabled = false
end


Why no work?

(It suppose to check if the part is transparent and if it is then to turn off the pointlight and if it isn't to turn it on and run Pulse)
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
06 Jun 2015 10:46 AM
print("Check:", check)
Report Abuse
DeSpizer27 is not online. DeSpizer27
Joined: 13 Jul 2012
Total Posts: 2679
06 Jun 2015 10:47 AM
trs = script.Parent.Parent.Transparency

if trs >= 1 then
script.Parent.Enabled = false
elseif trs < 1 then
print'Checked'
script.Pulse.Disabled = false
end
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
06 Jun 2015 10:48 AM
What about it doesn't work? Is it doing the wrong thing, or is it not doing anything at all?
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
06 Jun 2015 10:48 AM
1) trs will never be greater than 1
2) if it's equal to one, we don't need to check if it is less than 1
Report Abuse
DeSpizer27 is not online. DeSpizer27
Joined: 13 Jul 2012
Total Posts: 2679
06 Jun 2015 10:50 AM
k mang

if trs == 1 then

elseif trs == 0 then

***
Report Abuse
Mariokillsyou645 is not online. Mariokillsyou645
Joined: 22 Aug 2011
Total Posts: 129
06 Jun 2015 10:56 AM
@kingkiller1000 Nothing happens

Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
06 Jun 2015 10:56 AM
What if it's between 0 and 1?
Report Abuse
Mariokillsyou645 is not online. Mariokillsyou645
Joined: 22 Aug 2011
Total Posts: 129
06 Jun 2015 10:58 AM
It can't be
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
06 Jun 2015 10:59 AM
I set up a little test in studio, and your script works fine. Is this the whole script?
Report Abuse
Mariokillsyou645 is not online. Mariokillsyou645
Joined: 22 Aug 2011
Total Posts: 129
06 Jun 2015 11:01 AM
yup
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
06 Jun 2015 11:03 AM
I don't know then.

By the way, my between 0 and 1 question was directed towards DeSpizer27.
Report Abuse
DeSpizer27 is not online. DeSpizer27
Joined: 13 Jul 2012
Total Posts: 2679
06 Jun 2015 11:14 AM
My original script handled between 0 and 1 as 0.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
06 Jun 2015 11:34 AM
> if trs == 1 then
> elseif trs == 0 then

Doesn't handle between 0 and 1.
Report Abuse
DeSpizer27 is not online. DeSpizer27
Joined: 13 Jul 2012
Total Posts: 2679
06 Jun 2015 12:25 PM
trs = script.Parent.Parent.Transparency

>if trs >= 1 then
script.Parent.Enabled = false
>elseif trs < 1 then
print'Checked'
script.Pulse.Disabled = false
end

Handles between 0 and 1.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
06 Jun 2015 09:59 PM
That's no different than the OP's script except putting the check in the if.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
07 Jun 2015 12:48 AM
part = script.Parent.Parent

if part.Transparency == 1 then
script.Parent.Enabled = false
else
script.Pulse.Disabled = false
end
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