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

Surface light changing color script?

i legit really started scripting today but my script to change light isnt working. i looked on the developer website but i didnt find anything that helped

local light = game.Workspace.Light
light.Color = Color3.new(225, 225, 225)
wait (2)
light.Color = Color3.new(138, 171, 133)

Im not sure if im missing something or i got it completely wrong.

If you need to know the part name its called Brick, before it was called Part and was changing colors from other scripts.

The surface light name is light.

3 comments

0

What is the Class Name?

0

sorry i dont know what that is lol

3 answers

Whoops, I saw a space between wait and (2) in line 2, it probably the problem with your script

local light = game.Workspace.Light
light.Color = Color3.new(225, 225, 225)
wait(2) -- Fixed
light.Color = Color3.new(138, 171, 133)

1 comment

0

Still doesnt work

Remember, The Color3 parameters should be on the range [0, 1].

local light = game.Workspace.Light
light.Color = Color3.new(225/255, 225/255, 225/255)
wait(2) 
light.Color = Color3.new(138/255, 171/255, 133/255)

1 comment

0

Still doesnt work. Does the script have to be a child of the surface light or something?

Figured it out i did

game.Workspace.Brick

instead of

game.Workspace.Brick.SurfaceLight

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