- What do you want to achieve? Keep it simple and clear!
I’m a bit confused on how :ApplyImpulse functions. I’d like to find how to actually get my script to work, and apply the changes I’ve made to my Forward Dash onto my other dashes.
- What is the issue? Include screenshots / videos if possible!
My current issue is that the code I have for the forward dash doesn’t work (It uses :ApplyImpulse) while everything else (which creates a velocity instead) does. The video quality is absolute trash, so here are the important segments I believe are relevant. These are both in a local script.
Forward Dash
if WKeyDown then
print(hrp.CFrame.LookVector)
hrp:ApplyImpulse(hrp.CFrame.LookVector * 110)
elseif...
Other Dashes
elseif AKeyDown then
local Tween = TweenService:Create(hrp,TweenInfo.new(DashTime,Enum.EasingStyle.Linear,Enum.EasingDirection.Out),{Velocity = hrp.CFrame.RightVector * -110})
Tween:Play()
elseif SKeyDown then...
I’ve confirmed that the other dashes work perfectly fine, but the Forward Dash doesn’t work.
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve found a few topic that notes that :ApplyImpulse() doesn’t work when managed by the client. I think this might be my issue, but I’m not sure how to implement it.
More code can be provided if it calls for it, and there’s a free model that I “borrowed inspiration” from in order to write this script.