GIEGO04
(GEGO)
May 11, 2022, 8:12pm
#1
I have a problem, and it is that when I use an ability in my game and the character collides with something, it flies away, I use BodyVelocity and I don’t know if there is another better option, does anyone know how to solve it?
Code
local BodyV = Instance.new("BodyVelocity", character.Torso)
BodyV.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
BodyV.Velocity = character.HumanoidRootPart.CFrame.LookVector * 100 + Vector3.new(0, 5, 0)
wait(0.5)
BodyV:Destroy()
1 Like
Try lowing the MaxForce to something in the ten-thousands. That’s what’s works for me.
1 Like
GIEGO04
(GEGO)
May 11, 2022, 8:22pm
#3
I already lowered it to 60 and the same thing continues
It might have something to do with the animation, since you are putting it into the Torso. Try putting the BodyVelocity into character.HumanoidRootPart.
1 Like
GIEGO04
(GEGO)
May 11, 2022, 8:30pm
#5
I put it in the humanoidrootpart and it still happens
May I see the entire script? Might help.
1 Like
GIEGO04
(GEGO)
May 11, 2022, 8:36pm
#7
elseif key == Enum.KeyCode.R and not RDebounce and CanAttack then
RDebounce = true
CanAttack = false
AttackType = "R"
local DestryoWaterWheel = coroutine.wrap(function(waterSpin)
for _, Effect in pairs(waterSpin:GetChildren()) do
if Effect:IsA("ParticleEmitter") then
wait(0.1)
Effect.Enabled = false
end
end
waterSpin:Destroy()
end)
Tool.Components.Hitbox.SpinWater:Play()
RKeyAnim:Play()
character.Humanoid.WalkSpeed = 0
Tool.Components.Hitbox.SquirtWater1.Enabled = true
Tool.Components.Hitbox.SquirtWater2.Enabled = true
Tool.Components.Hitbox.WaterLight.Enabled = true
Tool.Components.Hitbox.Trail.Enabled = true
character.HumanoidRootPart.LegsPart.Smoke.Enabled = true
character.HumanoidRootPart.LegsPart.Water.Enabled = true
wait(0.4)
Caster:Start()
local BodyV = Instance.new("BodyVelocity", character.Torso)
BodyV.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
BodyV.Velocity = character.HumanoidRootPart.CFrame.LookVector * 40
wait(0.3)
local waterSpin = ReplicatedStorage.CloneStuff.Example.WaterWheel:Clone()
waterSpin.Parent = character.Torso
DestryoWaterWheel(waterSpin)
BodyV:Destroy()
local BodyV = Instance.new("BodyVelocity", character.HumanoidRootPart)
BodyV.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
BodyV.Velocity = character.HumanoidRootPart.CFrame.LookVector * 50 + Vector3.new(0, 5, 0)
Tool.Components.Hitbox.Trail.Enabled = false
Tool.Components.Hitbox.water_splash2:Play()
wait(0.5)
BodyV:Destroy()
Caster:Stop()
Tool.Components.Hitbox.SquirtWater1.Enabled = false
Tool.Components.Hitbox.SquirtWater2.Enabled = false
Tool.Components.Hitbox.WaterLight.Enabled = false
character.HumanoidRootPart.LegsPart.Smoke.Enabled = false
character.HumanoidRootPart.LegsPart.Water.Enabled = false
character.Humanoid.WalkSpeed = 16
CanAttack = true
wait(3)
RDebounce = false
All the tool is massless and cancollide off
I know I already asked this, but it does the exact same thing if you make the MaxForce for both velocities, like, 50k-100k? Because if it does then I honestly don’t know.
4 Likes
GIEGO04
(GEGO)
May 11, 2022, 8:42pm
#9
Yesss it worked, thank you very much!
1 Like
I am using BodyVelocity for character movement while attacking
and he was doing small jumps when colliding with the mobs.
It was setted to 400k MaxForce.
Now i lowered it to 50k and it fixed.
Thank you!