Were you looking for this? (It works on mobile as well):
https://developer.roblox.com/en-us/api-reference/enum/PlayerActions
Were you looking for this? (It works on mobile as well):
https://developer.roblox.com/en-us/api-reference/enum/PlayerActions
Nvm figured it out. I just used the HumanoidRootPartās CFrame.LookVector:Dot feature.
Thanks for helping though.
script :
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hrp = char:WaitForChild("HumanoidRootPart")
local dir, vel
while wait(0.3) do
vel = hrp.Velocity * Vector3.new(1, 0, 1)
dir = vel.Unit
if math.round(hrp.CFrame.LookVector:Dot(dir)) < 0 then
print("walking Backwards!")
end
end
Oh, I didnāt even know about this! But thanks!
Iām kind of hesitant to use while loops on this as it can cause performance issues, but if it works for you then, it works.
How do I use this lol Iām a bit confused.
Simply just do this:
local ContextActionService = game:GetService("ContextActionService")
local function Backwards()
print("I moved backwards, yay!")
end
-- Do not set it to true as even if it has a button, it'll only work when you move backwards.
ContextActionService:BindAction("Backwards", Backwards, false, Enum.PlayerActions.Backward)
I also want to ask why did you reply 12 days later?
New game⦠Pretty much lolā¦