Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Light not blinking?

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 :)

3 comments

0

Just pointing out that "local" is not necessary outside of a function, the problem is that "Transparence" requires a capital "T"

0

Oh ok, thank you :)

0

Still doesn't seem to work though /:

2 answers

✓ Accepted answer
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.

2 comments

0

Yup, thank you :)

0

Accept my answer if it worked :)

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

1 comment

0

Oh okay cool, so if I were to make this script under the Transparency one, would it still stay in sync with it?

This discussion is preserved as it was. New answers, comments, and votes are closed.