Why aren't my parts bursting outwards?

Hello!

I am currently following this tutorial to make PSX style coins. However, when i test it. The parts dont spread out.

HIS:

image

MINE:

Code


local Drop = {}

function Drop.DropCurrency(originCFrame, object, amount, value)
	for i= 0, amount do
		local cloneObj = object:Clone()
		cloneObj.Name = "Drop "..i
		cloneObj.Value.Value = value
		cloneObj.CFrame = originCFrame
		cloneObj.Parent = workspace:WaitForChild("Drops")
		
		local randomX = {math.random(-10, -2), math.random(2,10)}
		local RandomZ = {math.random(-10, -2), math.random(2,10)}
		
		local velocity = Vector3.new(randomX[math.random(1,5)], math.random(50,60), RandomZ[math.random(1,5)])
		
		cloneObj.AssemblyLinearVelocity = velocity
		
	end
end
	
return Drop

Please help!

1 Like

The video is doing math.random(1,2), not math.random(1,5). Try correcting that to see if it resolves the issue.

1 Like

Yeah, i thought that would fix it. But it didn’t.

I actually found the error. THE DROPS WERE ANCHORED!!!

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