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

How do I change the color of a new instance point light?

I just need the change in the color from white to the color similar to bright yellow, thanks. (the point light will be called light if that helps)

Here's the script I need help with: (The parent of the light will be each part (ft, fh, etc.

	local light = Instance.new("PointLight")
	light.Range = 10
	light.Brightness = 1
	light.Enabled = true
	light.Shadows = true
	light.Parent = ft

2 comments

0

Can you please show us your attempt at making this script.

0

Oh, sure, sorry.

1 answer

✓ Accepted answer

Light color uses an property called Color3. So you need to call Color3.new on Color property.

local light = Instance.new("PointLight")
light.Range = 10
light.Brightness = 1
light.Enabled = true
light.Shadows = true
light.Parent = ft
light.Color = Color3.new (r/225, g/255, b/255) -- i use it because Color3 uses a range of 1 instead of a range of 255. So the value is divided by 255, getting an value between 0 and 1

5 comments

0

Thanks :)

0

Doesn't work, I tested it...

0

...

0

Sorry, I put in those r/ g/ b/ and it didn't work, removed them and it worked fine. Thanks :)

0

you must to input values where is r, g and b. Common sense, not?

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