Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 8 years ago
Edited by OldPalHappy 8 years ago
01local light = script.Parent.PointLight
02 
03while true do
04    wait(.5)
05    script.Parent.BrickColor = BrickColor.new("Really red")
06    wait(.001)
07    light.Color = Color3.new(255/255, 0/255, 0/255)
08    wait(.5)
09    script.Parent.BrickColor = BrickColor.new("Lime green")
10    wait(.001)
11    light.Color = Color3.new(0/255, 255/255, 0/255)
12    wait(.5)
13end
0
try script.Parent:WaitForChild("PointLight") if it still has that error, then PointLight is not a child of script.Parent Azarth 3141 — 8y
0
Thank you it works killzone45671 -20 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

"try

1script.Parent:WaitForChild("PointLight")

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

Ad

Answer this question