local Players = game:GetService("Players")
local RS = game:GetService("ReplicatedStorage")
local clct = game:GetService("CollectionService")
Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(chat)
if chat == "/Builds" and plr.Name == "Vortexuel560" then
print(chat)
for _, V in pairs(Workspace.Complex:GetDescendants()) do
if V:IsA("BasePArt") then
if clct:HasTag(V, "Window") then
V.SurfaceLight.Enabled = true
end
end
end
end
end)
end)
Im going through a model and seeing if its decendants have a child with a tag called window, if true then turn on that parts surface light.
All the required parts have tags called window, and surface lights.
There are no errors also in the output