-
What do you want to achieve? Keep it simple and clear!
I want to make it so the dash can change the direction of the velocity if the player changes direction mid-dash (ex: if the player dashes forwards with shiftlock on then turns to the left with their camera, it will make the dash go in that direction (similar to blox fruits or tsb dash)) -
What is the issue? Include screenshots / videos if possible!
LinearVelocity makes the player go in one direction and it cant be altered. Ive also tried increasing the cframe z, but that also doesnt let you turn -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i cant find anyone with my problem, its all people wondering how to check the direction of the player for a dash (i already did this)
Here is the serverscript
dashremote.OnServerEvent:Connect(function(player, dir)
local character = player.Character or player.CharacterAdded:Wait()
local hrp = character.HumanoidRootPart
local hum = character.Humanoid
if dir == 'forward' then
--ive tried multiple things here but i want the direction to kinda be relative to the camera?
--im not sure how to explain it
elseif dir == 'backward' then
elseif dir == 'left' then
elseif dir == 'right' then
end
end)
and here is the player direction detection localscript:
local function getdirection()
if uis:IsKeyDown(Enum.KeyCode.A) then
return 'left'
elseif uis:IsKeyDown(Enum.KeyCode.D) then
return 'right'
elseif uis:IsKeyDown(Enum.KeyCode.S) then
return 'backward'
else
return 'forward'
end
end