MobileGUI.MobileFrame.DashButton.MouseButton1Click:Connect(function()
local movedirection=HRP.CFrame:VectorToObjectSpace(hum.MoveDirection)
local yDirection=math.atan2(movedirection.X,movedirection.Z)
local roundDirection=math.ceil(math.deg(yDirection)-0.5)
print(roundDirection)
if roundDirection>0 and roundDirection<=180 or roundDirection==0 and roundDirection<=180 then
Dash:FireServer("FrontDash", 1)
elseif roundDirection<0 and roundDirection<=-180 then
Dash:FireServer("BackDash", 1)
elseif hum.MoveDirection==Vector3.new(-1,0,0) then
Dash:FireServer("LeftDash", 2)
elseif hum.MoveDirection==Vector3.new(1,0,0) then
Dash:FireServer("RightDash", 2)
end
end)
#how to make a dash system for mobile?
1 messages · Page 1 of 1 (latest)