When I turn the light on it is white. If I try going in "Play Solo" I turn the light on and edit the colour. When I turn it on and off again it goes back to white. Can someone suggestion something I need to add on the script and where to add it.
Script:
local LightPart = workspace.Park script.Parent.MouseButton1Click:connect(function() if LightPart:findFirstChild(LightPart.Name..'Light') then LightPart:findFirstChild(LightPart.Name..'Light'):Destroy() script.Parent.Text = 'Press to turn light on' else local light = Instance.new("PointLight", LightPart) light.Name = LightPart.Name..'Light' light.Range = 30 script.Parent.Text = 'Press to turn light off' end end)
local LightPart = workspace.Park script.Parent.MouseButton1Click:connect(function() if LightPart:findFirstChild(LightPart.Name..'Light') then LightPart:findFirstChild(LightPart.Name..'Light'):Destroy() script.Parent.Text = 'Press to turn light on' else local light = Instance.new("PointLight", LightPart) light.Name = LightPart.Name..'Light' light.Range = 30 light.Color=Color3.new(1/255,2/255,3/255)--Here find the color3 you want, and replace the 1 2 or 3, but keep the /255 that keeps the color you want script.Parent.Text = 'Press to turn light off' end end)
Well you don't even need to use a script for this, just edit the light's color in its properties in "edit" mode. You can just place it in workspace, and then when you change the color property of the pointlight, you can see it. Afterwards, any changes you make are permanent.
Marked as Duplicate by AmericanStripes
This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.
Why was this question closed?