Object collision sound on impact

So I’m pretty sure you have seen this before: Roblox block collision sounds (2011 client) - YouTube I already created my own version but I don’t know how to make it better.

I tried only one way to make the system but it isn’t realistic enough.

I’ve tried watching tutorials on YouTube of advanced scripting but nothing seems to be working.

script.Parent.Touched:Connect(function(hit)
	if hit:IsA("BasePart") then
		if script.Parent.AssemblyLinearVelocity.Magnitude > 0 then
			script.Parent.Sound.Playing = false
		end
		if script.Parent.AssemblyLinearVelocity.Magnitude > 1 then
			script.Parent.Sound.Playing = true
		end
	end
end)

script.Parent.TouchEnded:Connect(function(hit)
	if hit:IsA("BasePart") then
		script.Parent.Sound.Playing = false
	end
end)

Does anyone have any advice? If so, message me instantly thanks.

1 Like

Is the magnitude greater than 0 or 1 before it hits?

1 Like

The mangitude is 1 before it hits

It could be playing fast, then stopping right after