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

PointLight is not a valid member of Part? [Solved]

local light = script.Parent.PointLight

while true do
	wait(.5)
	script.Parent.BrickColor = BrickColor.new("Really red")
	wait(.001)
	light.Color = Color3.new(255/255, 0/255, 0/255) 
	wait(.5)
	script.Parent.BrickColor = BrickColor.new("Lime green")
	wait(.001)
	light.Color = Color3.new(0/255, 255/255, 0/255) 
	wait(.5)
end

2 comments

0

try script.Parent:WaitForChild("PointLight") if it still has that error, then PointLight is not a child of script.Parent

0

Thank you it works

1 answer

"try

script.Parent:WaitForChild("PointLight")

if it still has that error, then PointLight is not a child of script.Parent" ~Answered by Azarth in the comments

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