Hello, i am working on a game called Would You Rather, when players choose one of the 2 options the system moves the user, Whenever i am using a controller or mobile it will move slow, its not touching the walkspeed or something, How could i fix this?
I believe this is caused by the mobile/xbox joystick controls altering WalkSpeed when not fully walking in a certain direction. Try setting their WalkSpeed to 16 before/while using MoveTo.
Following on from what @Starception was saying, it might be that the joystick and thumbpad controls are constantly setting their walkspeed to 0 if there is no input from the player. Try disabling this script and running the moveTo function. It might help.
I’ve had this issue before, I think it has something to do with the last known Walkspeed of the player (which can vary based on the position input). From what I recall it was usually going slow but at slightly different speeds. I’m surprised that setting the WalkSpeed to 16 and then immediately calling moveto doesn’t work. Maybe try adding a Boolean variable to the humanoid and only tracking input based on that rather than disabling the script?
if inputObject.Position.magnitude > thumbstickDeadzone then
self.moveVector = Vector3.new(inputObject.Position.X, 0, -inputObject.Position.Y)
else
self.moveVector = ZERO_VECTOR3
end
and Replace it with the following:
if inputObject.Position.magnitude > thumbstickDeadzone then
local x,z = inputObject.Position.X,-inputObject.Position.Y
if x < -0.1 then x = -1 elseif x > 0.1 then x = 1 else x = 0 end
if z < -0.1 then z = -1 elseif z > 0.1 then z = 1 else z = 0 end
self.moveVector = Vector3.new(x, 0, z)
else
self.moveVector = ZERO_VECTOR3
end
And now, it should be fixed! No more walking/running at slower rates from mobile/console users!