How can I tell if the mobile joystick is pointed forwards

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to tell if the mobile joystick is facing forwards for a run system
  2. What is the issue? Include screenshots / videos if possible!
    No idea how I can do this
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    No one has ahd the same problem
1 Like

Could you try Humanoid.MoveDirection?. This option isn’t only for mobile but it could work.

How would I utilize this too see if the player moves forwards?

if Humanoid.MoveDirection == Character.HumanoidRootPart.CFrame.LookVector then
--line of code
end

maybe this will work

charlimits

This doesn’t work whatsoever, I need something better

How exactly should I use this?, explain please

Humanoid.MoveDirection is a Vector3 and detects the direction the player is moving in. If it isn’t moving, it will be set to 0, 0, 0.

I will try and find how to do this. I’m currently testing this on a roblox game.

thank you very much for your helpfulness

No problem!

robloxcharlimits

What in the world is robloxcharlimits???

Oh no don’t worry. I used that cuz roblox’s character limits are 30. So my sentence was too short by itself.

local roundhumanoidmd = Vector3.new(math.round(humanoid.MoveDirection.X), math.round(humanoid.MoveDirection.Y), math.round(humanoid.MoveDirection.Z))
local roundlookvector = Vector3.new(math.round(char.HumanoidRootPart.CFrame.LookVector.X), math.round(char.HumanoidRootPart.CFrame.LookVector.Y), math.round(char.HumanoidRootPart.CFrame.LookVector.Z))
if roundhumanoidmd == roundlookvector then
	--code
end

I rounded both Vector3s and checked if there are equal, meaning that the character is walking forwards.

Remember to define char.

thank you, it works very well.

No problem!

robloxcharlimits

You might want to loop it or do :GetPropertyChangedSignal() to both Humanoid and HumanoidRootPart as the position will keep on changing.

Like this,

I just needed to find out wether they were moving forwards once. after that it doesn’t matter. I just check everytime they want to sprint.

oh ok. Don’t worry about it then.