
2.3k Views
10.1k Executions
Mobile WASD Joystick
10K executions
Universal Script 📌
theobscured102Published 10
7 months ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Just a silly script I put together. It makes your joystick behave more like WASD on a keyboard. It also supports proper diagonal movement, so inputs combine the same way WASD does.
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
local playerScripts = player:WaitForChild("PlayerScripts")
local controls = require(playerScripts:WaitForChild("PlayerModule")):GetControls()
local BIND_NAME = "CameraAlignedMobileMove"
local DEADZONE = 0.05
local SNAP_THRESHOLD = 0.3
local humanoid
local function getHumanoid()
local character = player.Character or player.CharacterAdded:Wait()
return character:WaitForChild("Humanoid")
end
local function unbind()
RunService:UnbindFromRenderStep(BIND_NAME)
end
local function flatUnit(vector)
local flat = Vector3.new(vector.X, 0, vector.Z)
return flat.Magnitude > 0 and flat.Unit or Vector3.zero
end
local function snap(x, z)
local sx = math.abs(x) > SNAP_THRESHOLD and (x > 0 and 1 or -1) or 0
local sz = math.abs(z) > SNAP_THRESHOLD and (z > 0 and 1 or -1) or 0
local vector = Vector3.new(sx, 0, sz)
return vector.Magnitude > 0 and vector.Unit or Vector3.zero
end
local function hookCharacter(character)
unbind()
humanoid = character:WaitForChild("Humanoid")









I've been looking for this script everywhere thank you man