[Reward Drop System]: How do I make parts stand upwards, level with the ground, while can collide is disabled?

I want to make a similar reward drop system to these games:

  • Pet Simulator: Drops tokens around certain radius of the chest
  • World Zero: Drops rewards after defeating the enemy

I notice that their rewards drop while standing upwards, levels with the ground and the parts aren’t collideable with the players atleast.

But my issue is that when I make mine the tokens are going through the ground. I tried body gyro but it only keeps them standing upwards, but goes through the ground cause it doesn’t collides with the ground (as I only want it to not collide with player).

Code:

local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
local RNG = Random.new():NextNumber(1, 2)
local EndAmount = math.random(3, 6);
local Radius = math.random(3,5);
local Circle = (math.pi * RNG);
	
for i = 1, EndAmount, 1 do
	spawn(function()
		local Clone = script.Token:Clone()
		Clone.Position = HumanoidRootPart.Position
		Clone.Parent = workspace

		local Angle = ((Circle / EndAmount) * (i + RNG)); 
		local x_pos = math.cos(Angle) * Radius;
		local y_pos = math.sin(Angle) * Radius;

	 -- Falls to ground, rewards are distrubuted within the character radius.
		local Tween = TweenService:Create(Clone, TweenInfos.SpawnInfo, {Position = HumanoidRootPart.Position + Vector3.new(x_pos, 0, y_pos)});
		Tween:Play()
		Tween.Completed:Wait()

		-- Floats
		local Tween2 = TweenService:Create(Clone, TweenInfos.FloatInfo, {Position = Clone.Position + Vector3.new(0, 1.5, 0)});
		Tween2:Play()
	end)
		
end

You need to leave CanCollide on, and instead create a Collision Group with players and coins, which will allow coins to collide with other things, but not players.

3 Likes

Appreciate it, i’ll look into this and see if it works, if not I’ll update you on it :+1:

It works but now the physics of falling are a little weird. I think it’s cause I repeatedly loop my tween so it doesn’t just have that floating affect while falling

If you want your tweens to behave correctly, you’ll have to anchor the part you’re tweening else its gonna result in odd glitch outs/spazz outs.

https://gyazo.com/2a2392e5072a063e4cc6cd3ebb9e80a1

That would leave the coins floating mid air if the NPC was falling or something. I noticed that World zero was able to have the floating tween (if it was a tween), repeat while physics were able to land the rewards to the ground