Hi, thank you for reading. What I'm trying to do here is that after every 10 seconds, a part named "Foil" is spawned into the workspace. The Foil is moved to where the part is. The problem is that at it says
15:23:52.967 - Workspace.Script:9: unexpected symbol near '=='
Material = game.Lighting.Loot:getChildren()
while true do
print("Spawning")
wait(10)
for i = 1, #Material do
if Material[i] ~= nil then
if Material[i]:findFirstChild("Foil") then
Material[i]:findFirstChild("Foil"):clone() == Material
Part = game.Workspace.Part
if Part ~= nil then
Material:MoveTo(Part.Position)
end
end
end
end
end

3 comments
There was an error: Workspace.Script:9: bad argument #3 to 'Parent' (Object expected, got table)
I think when it says Workspace.Script.9, it meant Workspace.Script.10 cause i deleted the green words
Resolved