Multipart Function

I want to create a unique system that controls several droppers, but the one I created only hits one at a time

while true do 
	for i,v in pairs(game.Workspace:GetChildren()) do
		if v.Name == "Model" then
	local Module = require(v.Dropper)
	local Model = game.ReplicatedStorage.Ore:Clone()
	Model.Parent = game.Workspace
	Model.Position = v.Part.Position
	Model.Material = Module.Material
	Model.BrickColor = v.Dropper.Color.Value
	task.wait(1.5)
	print("foi")
		end
		end
	end

would this function reach all together or will I have to use another one?

Who can help me I will be very grateful :grin:

It will loop through for each object in the workspace but it’ll wait 1.5 seconds between each object called “Model” so you would probably need to use a coroutine or move the wait outside of the for loop

2 Likes

I’ll test it, and I’ll get back to you

1 Like

that was all, thank you very much, it worked perfectly, how did I not think of that :smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.