In my hockey game, for “checking” it gives players a boost to help them get to a specific area or target easier. But with PGS physics, body velocities make it so you cannot move at all, only rotate while its active. Is there a way I can make it a boost, not a controlling velocity?
I believe the best way would be to add a velocity vector to the HumanoidRootPart’s velocity. For example, if you want to boost them in the direction from the attacking player to the player being checked:
local checkSpeed = 10 -- how hard they're pushed local checkVel = (attackingChar.HumanoidRootPart.Position - hitChar.HumanoidRootPart.Position).Unit * checkSpeed hitChar.HumanoidRootPart.Velocity = hitChar.HumanoidRootPart.Velocity + checkVel -- or... (I think this works in Luau now) hitChar.HumanoidRootPart.Velocity += checkVel
I’ve tried something like that but the velocity dwindles after a second of that firing. Body velocities can sustain that for as long as they’re a child of the part.
Might be a bit overkill, but you could try welding a part in front of the player’s HRP and using an AlignPosition with a responsiveness of 200.
I would, but the thing is, you can hit in 360 direction. And I want players to be able to move still. That seems like you can only do it in one direction
Why not just increase the walkspeed then?
Because I want a boost in a direction, not make it so people can move 20x faster.
You can still move your character around with an AlignPosition
It’d be harder to do, I’m researching how VectorForces work currently. I don’t want the velocity to maintain it, I want it to boost you. AlignPosition is a body position. Not a boost.
In a direction, not to a position.