You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I want when I dash into a wall not to cancel my fall damage or atleast get fall damage when u dash into a wall. I just have NO idea of how to do this. I’ve been googling looking for a solution but can’t find any.
- What is the issue? Include screenshots / videos if possible!
So my fall damage works, but when I dash into a wall, it stops the velocity and cancels my fall damage
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Tried setting the max force of my dash to 0.
This is my fall damage script:
local player = game.Players.LocalPlayer
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local dofalldamageevent = game.ReplicatedStorage:WaitForChild("RemoteEvents"):WaitForChild("Other"):WaitForChild("DoFallDamage")
humanoid.StateChanged:Connect(function(old,new)
if new == Enum.HumanoidStateType.Landed then
print("Landed with " .. tostring(math.round(math.abs(character.HumanoidRootPart.Velocity.Y))) .. " velocity")
local falldistance = math.round(math.abs(character.HumanoidRootPart.Velocity.Y))
if falldistance > 100 then
local damage = falldistance/5
dofalldamageevent:FireServer(damage)
end
end
end)
This script works great, but when I dash into a wall it doesn’t work. This is a snippet of my dash script:
local v = Instance.new("BodyVelocity", player.Character:WaitForChild("HumanoidRootPart"))
v.MaxForce = Vector3.new(25000,300,25000)
v.Velocity = CFrame.Angles(0, math.rad(45), 0) * player.Character.HumanoidRootPart.CFrame.LookVector * 50
game.Debris:AddItem(v,0.3)
The dash script works nice too, it just doesn’t work with fall damage. Here is a clip of my issue: (don’t mind the weird ragdoll, I made that myself)
External MediaLet me know if you have any questions or if I wasn’t clear about something. Thanks!