Hey, I’m currently trying to fix an error a former scripter of a game made. It is spamming this error, even though everything is fine. The script is dedicated to a dance floor.
Code:
game.ReplicatedStorage.Copy.OnClientEvent:Connect(function()
local va = game.ReplicatedStorage:WaitForChild("df", 0.5)
if va then
local v = va:Clone()
v.Parent = script
for i,v2 in pairs(v:GetChildren()) do
local vaa = workspace.df:FindFirstChild(v2.Name)
if vaa.Color ~= v2.Value then
vaa.Color = v2.Value
end
end
v:Destroy()
end
end)
Whatever v2.Name is, it isn’t being found in workspace. You got a nil value. The point of df:FindFirstChild(v2.Name) is to see if that child first exists so you should be expecting a nil value anyways.
You could do this if you can’t find the child;
if vaa and vaa.Color ~= v2.Value then
vaa.Color = v2.Value
end