Problem With Linear Velocity

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I’m trying to make the enemy knockback using linear velocity

  1. What is the issue? Include screenshots / videos if possible!

The enemys linear velocity dosent seem to be working

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

ive tried rewriting, i even tried bodyVelocity as a last resort and not even thats working. Ive tried it on multiple different rigs and still nothing but the linear velocity i have on my character seems to work fine

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

 elseif Params.Stage == "Hit" then
            
            local hitAtt = FxFolder.RaijinStrikeHitfx.Attachment:Clone()
            hitAtt.Parent = eHum.Parent.Torso
            
            EmitParticle(hitAtt)
            
            local LinearVelocity = Instance.new("LinearVelocity")
            LinearVelocity.MaxForce = math.huge
            LinearVelocity.VectorVelocity = hrp.CFrame.LookVector * 30
            LinearVelocity.Attachment0 = humanoid.RootPart.RootAttachment
            LinearVelocity.Enabled = true
            LinearVelocity.Parent = humanoid.RootPart.RootAttachment
            
            local EnemyLinearVelocity = Instance.new("LinearVelocity")
            EnemyLinearVelocity.MaxForce = math.huge
            EnemyLinearVelocity.VectorVelocity = hrp.CFrame.LookVector * 30
            EnemyLinearVelocity.Attachment0 = eHum.RootPart.RootAttachment
            EnemyLinearVelocity.Enabled = true
            EnemyLinearVelocity.Parent = eHum.RootPart.RootAttachment
            
            game.Debris:AddItem(LinearVelocity, .1)
            game.Debris:AddItem(EnemyLinearVelocity, .1)
            game.Debris:AddItem(hitAtt, 1)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

2 Likes

It may be because you are deleting them too soon after creating them, so they don’t have a chance to affect it properly.

You can alsoi try using :ApplyForce or smth like that. I can’t recall the exact name but it allows you to put an instantaneous force on an object.

I dont think thats it because ive commented thos out to see if that was the problem but the same thing happened, ill look into that apply force thing your talking about

Fixed just a problem with network ownership

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