01 | while true do |
02 | wait( 0.03 ) |
03 | if script.Parent.on = = true then |
04 | script.Parent.G 1. a.Transparency = 0 |
05 | script.Parent.G 1. a.SurfaceLight.Enabled = true |
06 | script.Parent.right.Transparency = 0 |
07 | wait( 0.05 ) |
08 | script.Parent.G 1. a.Transparency = 1 |
09 | script.Parent.G 1. a.SurfaceLight.Enabled = false |
10 | script.Parent.right.Transparency = 1 |
11 | wait( 0.05 ) |
12 | script.Parent.G 1. a.Transparency = 0 |
13 | script.Parent.G 1. a.SurfaceLight.Enabled = true |
14 | script.Parent.right.Transparency = 0 |
15 | wait( 0.05 ) |
I have this script. I am trying to make it so if on is true the following will run. It is not working in game and not listening at all. It also won't return any errors.
Probably this: "script.Parent.on == true"
If you're checking if it exists, do: "script.Parent:FindFirstChild("on")" but if you're checking if a BoolValue's Value IS TRUE, do: "script.Parent.on.Value == true"
If you are defining a part(as in the on), == should work.
the if statement does not need to be there. classic should work
as in this
1 | script.on = = true |
then at the end
1 | script.on = = true |
Parent does need to be there