#Rush skill

1 messages · Page 1 of 1 (latest)

vital lotus
#

How do you make a rush ability? I've been trying to make one for a long time, but something always goes wrong, lol, I normally used something like this:

local hitbox = instance.new("Part", Workspace.Fx) -- fx is a folder
-- configuratios from hitbox like masless, can collide, anchored, etc
local weld = instance.new("WeldConstraint", hitbox)
--same configurations like part0, etc

local force = Instance.new("BodyVelocity", HumanoidRootPart)
-- configurations la max force, vector, etc

hitbox.Touched:Connect(function(hit)
-- here when touches the enemy
end)
task.delay(10, function()
hitbox:Destroy()
force:Destroy()
end)

But every time I tried it, it only worked at short distance, if I did it at long distance, even if I touched the hitbox, it didn't work.

forest charm
#

you're on the right track with the rush ability, this is actually a super common problem. the reason it works up close but not from far is cause .Touched kinda sucks when something’s moving fast, it just misses the collision completely half the time. a better way to handle it is by using raycasting instead, like shoot a ray from the character in the direction they’re rushing and check if it hits anyone. way more consistent and won’t randomly fail. also bodyvelocity is a bit outdated now, so you might get more control using TweenService or just manually moving the CFrame.

vital lotus