So, I want to make an ability that knockbacks players within a certain radius of the player who used the ability. However, I have no idea how to script such an ability. How would I code the knockback?
Sorry if I don’t understand your explanation, I am not an experienced programmer.
If they are close enough, add to their Character’s HumanoidRootPart Linear Velocity
To that Linear Velocity apply the Vector that represents a direction which way it should knockback them using the following algorithm
-- ITS A PSEUDO-CODE, DONT JUST COPY PASTE, ITS MADE TO SHOW THE CONCEPT
local direction = PlayerCharacter.HumanoidRootPart.Position - CentreOfAoeSkill
LinearVelocity.Velocity = dir