Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[SOLVED I FIXED IT MYSELF!] how to detect if multiple parts have moved?

I have tried making a for loop in my game for that. I'll just include the part of the script with the part.

Can someone tell my why this won't work and how to fix it

InRound.Changed:Connect(function()
	
		for _, child in pairs(workspace.Ruins:GetChildren()) do
			if child:IsA("Part") then
				for i = BricksToWin, 1000, 1 do
					if child.Position == Vector3.new(0,-2,0) then
						print("Destroyed")
						Score.Value = "A team has:".. i .. "bricks destroyed"
					end
				end
			end
		end
	else
		

1 answer

Instead of using the if child.Position, use the child.Changed event

This discussion is preserved as it was. New answers, comments, and votes are closed.