Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Light not blinking?

Asked by
AmVolt 60
9 years ago

So I'm new to scripting and I tried to do a script but it unfortunately did not work. Here is what I did:

local part = game.Workspace.Camera1.Light

while true do 
    part.transparency = .5
    wait(1)
    part.transpareny = 1
    wait(1)
end


So I wanted the part to change transparency every second but this script does not seem to work. Nothing shows anything wrong in the output. What did I do wrong? The script is under the Game.Workspace.Camera1.Light.Script

Another Question: Can I also change the brightness of the light every second along with the transparency? Thank you :)

0
Just pointing out that "local" is not necessary outside of a function, the problem is that "Transparence" requires a capital "T" BSIncorporated 640 — 9y
0
Oh ok, thank you :) AmVolt 60 — 9y
0
Still doesn't seem to work though /: AmVolt 60 — 9y

2 answers

Log in to vote
-1
Answered by 9 years ago
local part = game.Workspace.Camera1.Light

while true do 
    part.Transparency = .5
    wait(1)
    part.Transparency = 1
    wait(1)
end

First of all you had "part.transparency = .5" The t Need's to be capital.

2nd Of all you had "part.transpareny = 1

Tell me if that worked for you.

0
Yup, thank you :) AmVolt 60 — 9y
0
Accept my answer if it worked :) ShadowShocks 42 — 9y
Ad
Log in to vote
3
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

PointLights still shine reguardless of the transparency of the part. You need to set PointLight.Enabled to either true or false, or you could set PointLight.Range.

local part = game.Workspace.Camera1.Light

while true do 
    part.Range = 8
    wait(1)
    part.Range = 0
    wait(1)
end
0
Oh okay cool, so if I were to make this script under the Transparency one, would it still stay in sync with it? AmVolt 60 — 9y

Answer this question