Create smooth tycoon dropper + NPC animation

I have an NPC animation, that starts when you purchased them. I want to have a transition of an item being created, and moved with the animation to the dropper. At the moment, I can’t get timing right, as the dropped item is created on the server, while animation runs from client, so I can’t get it perfectly synced.

ezgif.com-gif-maker (86)

DROP_TIME is specific to each dropper, so I can have custom drop times for each drop type.

while true do
				wait(DROP_TIME)
				
				local NewDrop = Instance.new("Part")
				NewDrop.Position = dropper.Position
				NewDrop.Size = Vector3.new(2, 2, 2)
				NewDrop.Name = "Drop"
				NewDrop.Material = Enum.Material.SmoothPlastic
				
				NewDrop:SetAttribute("CashGiven", dropper:GetAttribute("CashGiven"))
				
				PhysicsService:SetPartCollisionGroup(NewDrop, "DropItems") -- Set Collision Group
				
				NewDrop.Parent = workspace
				
				Debris:AddItem(NewDrop, 6) -- In case it never touches a collector
				
				wait(DROP_TIME)
			end

Got your back! What I would do is rig the character with the part you want to drop, make some animation effects using the Constant easing style, and then add an animation event when the cube should drop, and you’re ready to go! If you have problems with what I explained, I could send a video aroumd 3 hours later for help.

Piggy-backing off of what @octav20071 said, you can use the :GetMarkerReachedSignal() function to detect when an AnimationEvent has been reached, and you can check out this post for further information about them and how to make/use them.

2 Likes