Hello, i was developing my soccer game and i have a problem that i never had, for some reason, the most normal method to kick the ball is in a invalid argument, this just happend to me, there is tons of soccer games that uses the same method and their games works, i dont really know if im doing something wrong but i use the same method everytime [Apply ball force with module]
Module error part:
function Mechanics.ApplyForce(Hit,Force,MaxForce,BodyPart)
Mechanics.RemoveForce(Hit)
Mechanics.React(Hit)
local Velocity = Instance.new("BodyVelocity")
Velocity.Parent = Hit
Velocity.MaxForce = MaxForce
Velocity.Velocity = BodyPart * Force
Debris:AddItem(Velocity, 0.3)
end
And this is how i use it in the kick tools:
local function AddForce(Hit,Velocity,Force,Limb,Bool)
DribbleR = false
Main.ApplyForce(Hit,Velocity,Force, "Right Leg", true)
end
> if Main.StrongFoot() == "R" then
> AddForce(Hit,Angle,Power,"Right Leg",true)
> elseif Main.StrongFoot() == "L" then
> AddForce(Hit,Angle,Power,"Left Leg",false)
> end
Someone knows how to fix this?