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 7 years ago
Edited by OldPalHappy 7 years ago
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
0
try script.Parent:WaitForChild("PointLight") if it still has that error, then PointLight is not a child of script.Parent Azarth 3141 — 7y
0
Thank you it works killzone45671 -20 — 7y

1 answer

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

"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

Ad

Answer this question