Alright so I just asked recently on how to get my lights to change inside of a part inside of a model. I do not know why but I consistently get a error stating Pointlight is not a valid member of Script and I want to know if that will cause any lag. Here's the script if anyone can figure out where the error is coming from. I had help from Sasial. Thank you Sasial! THIS DOES WORK, I just want to remove the error if possible What the script does. It gets all the pointlights inside of a part thats inside a model named ArenaLights and changes it when the value is triggered. I consistently get the error of Pointlight is not a valid member of Script and I'm worried it will cause lag, will it and if it will, how can I fix this? I am a fairly new scripter so I apologize in advance if I don't understand what you're saying.
Lighting = game:GetService('Lighting')
ReplicatedStorage = game.ReplicatedStorage
parts = game.Workspace.ArenaLights:GetChildren()
--------------------------------
game.ReplicatedStorage.LightingEvents.ArenaLightsEvent.OnServerEvent:Connect(function(player,arenalight)
if arenalight == "BrightWhite" then --White Lighting
for i,v in pairs(parts) do
v.PointLight.Color = Color3.fromRGB(255,255,255)
wait(0.01)
end
wait(0.01)
elseif arenalight == "White" then
for i,v in pairs(parts) do
v.PointLight.Color = Color3.fromRGB(255,255,255)
wait(0.01)
end
wait(0.01)
elseif arenalight == "Blackout" then
for i,v in pairs(parts) do
v.PointLight.Color = Color3.fromRGB(0,0,0)
wait(0.01)
end
wait(0.01)
end
end)
Thank you in advance for any time taken on this question and any answers submitted!

1 comment
AHH YES, Thank you so much! I do have a question for you, do you have a discord? I would love to learn what you were talking about with a Index, I'm extremely new to this stuff.