Disable Mobile Movement for 2D

hi devs
im currently making a 2d based game, where the player would only need to move left and right.
i have it well setup for pc players and console players, but for mobile players i cant reuse the same method.

any idea on what to do?

-- PC DISABLE
local ContextActionService = game:GetService("ContextActionService")

local function Sink()
	return Enum.ContextActionResult.Sink
end

function Pass()
	return Enum.ContextActionResult.Pass
end

ContextActionService:BindActionAtPriority("ArrowKeyDisable", Sink, false, Enum.ContextActionPriority.High.Value, Enum.KeyCode.Up, Enum.KeyCode.Down)
ContextActionService:BindActionAtPriority("WASDKeyDisable", Sink, false, Enum.ContextActionPriority.High.Value, Enum.KeyCode.W, Enum.KeyCode.S)

Probably make some custom buttons (only for left and right controls ofc)

i was thinking of this, but surely somewhere in the player movement module or dynamic thumbstick module theres a point that converts the position of the thumbstick to the vector movement of the player

still looking for solution *****

very late but resolved.

i went into the player movement module and edited the vectors so only the x coordinate could move and not the z.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.