Items dropped from tycoon dropper sometimes gets stuck in the air

I’m currently trying to make a tycoon but I’ve just encountered a bug where the part dropped from the dropper sometimes gets stuck mid - air, it gets fixed when the dropper drops again because the part pushes it, does anyone know how I can fix this?

Code inside of dropper:

	if script.Parent.Parent.SecondActivated.Value == true then
		local pumpkinClone = pumpkin:Clone()
		pumpkinClone.Parent = workspace
		pumpkinClone.CFrame = CFrame.new(script.Parent.DropperPart.Position)
	end
end```
2 Likes

Hey, there could be many reasons for this kind of bug to happen. Make sure the pumpkin is always un-anchored, you could have some other code that makes it Anchored, so just check that. Then it could be lag issues, your code might not be optimised (lots of loops, expensive performance calculations/operations).

Does it happen randomly or is there any pattern to it?

2 Likes

There’s a pattern to it, it gets stuck after the first 2 drops then gets stuck again

Also, yes, there’s lots of loops, do you have any idea on how to make it lag less?

First, try disabling all the other scripts with loops, besides the dropper script to see if the loops affect the dropping in any way. Let me know how that went.

1 Like

Hey there! That worked, but i found a solution. Instead of making it teleport to a parts position I just changed it so it was a Vector3 position.

So instead of setting CFrame you are setting Position?

1 Like

No, instead I changed the position to a bit lower, and made it a Vector3 instead of doing workspace.Dropper.DropperPart.Position