ApplyImpluse not wurking

  1. What do you want to achieve? Keep it simple and clear!
    I want my part to fly ;c I just added onto the Velocity Before but now I’m trying to use https://create.roblox.com/docs/reference/engine/classes/BasePart/ApplyImpulse
  2. What is the issue?
    it just explodes but doesn’t fly
    https://gyazo.com/2df34d1a67cbb07761ef33547e52677e.gif
  3. What solutions have you tried so far?
    Well, my problem before was trying to use something other than Velocity i found Applyimpluse but cant get it to work (._.’
Code here
-	delay(.005, function()
			local Explosion = Instance.new('Explosion')
			Explosion.Position = ProjctiePos
			Explosion.Parent = DestructibleObj.PrimaryPart

			local AIM = CFrame.new(ProjctiePos, Object.Position)
			local ThrowinVel = AIM.LookVector *  (workspace.Gravity*Force) --30Max 5lvls

			local  ObjectChildren = Object:GetChildren()
			for i = 1, #ObjectChildren do
				if ObjectChildren[i]then
					ObjectChildren[i]:ApplyImpulseAtPosition(ThrowinVel,ObjectChildren[i].Position) -- issue is here
				end
			end
		end)
		
		
2 Likes

Is this a LocalScript or a server script?

1 Like

A local script I want to run the special effects on the client

1 Like

The parts are unanchored, right?

1 Like

yea in the gif they move just not fly (like from me adding a force after explosion)

previously when i used velocity all the parts would fly in the opposite direction of the blast that hit it

1 Like

Hm, I see in the GIF that the parts move to one side before the explosion.

Maybe the code isn’t working as expected but the parts are moving, they move towards the direction the projectile comes from.

it moves but not necessarily fly. I need to add a force to each part individually to mimic an impact that sends the fragments flying

I figured it out: the Object I was looping through and setting the parts to fly was destroyed.

			local  ObjectChildren = DestructibleObj:GetChildren()
			for i = 1, #ObjectChildren do

Tempora: Arcanium - Roblox Studio (gyazo.com)

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