Making The Click To Move Movement System Default

Hello,
I am working on a game similar to the old isometric fallouts and was wondering about something. In those games, it utilized a click to move system. And I realize roblox has that same function, but I was wondering if there is any way to make it the default move system? Thanks in advance. Can’t really find any code snippets or api on this.

I don’t think you can do that with a script but I may be wrong.

local usergamesetting = UserSettings().GameSettings

usergamesetting.TouchMovementMode = Enum.TouchMovementMode.ClickToMove
usergamesetting.ComputerMovementMode = Enum.ComputerMovementMode.ClickToMove

thought that code would work but I get an error

A local script has permission 2 while you need permission 5 to edit the property.

Dang. That sucks. I would just make one from scratch, but I am unsure what to do.

I don’t know if humanoid:MoveTo works on a player but if a humanoid exist it should.
Disable the player controls. Get the mouse position then do a raycast. then do move the player using humanoid:MoveTo and pathfinding maybe. If its not a humanoid then just use tween.

https://developer.roblox.com/en-us/api-reference/function/Humanoid/MoveTo

local players = game:GetService("Players")
local player = players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

local mouse = player:GetMouse()

local function onLeftMouseButtonDown()
	if mouse.Target then
		humanoid:MoveTo(mouse.Hit.Position)
	end
end

mouse.Button1Down:Connect(onLeftMouseButtonDown)

Actually really simple to achieve this.

https://gyazo.com/312614a3354d9a9fdc5239b8bcedbd6a

You’d need to add the UI if you want to achieve the old style.

As for disabling the default controls here’s a useful resource.

2 Likes