I have never touched the Click To Move feature however I was wondering if there was anyway I could possibly edit the already built in Click To Move feature? It’s kinda clumpy and works very few times, wanted to try to tweak it and fix most of it however any suggestions is appreciated!
local players = game:GetService("Players")
local player = players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local mouse = player:GetMouse()
mouse.Button1Down:Connect(function()
character:PivotTo(mouse.Hit)
end)
If you open up your game and click “Run,” a ModuleScript named “PlayerModule” will show up in StarterPlayer.StarterPlayerScripts. This contains all of ROBLOX’s default control scripts. If you copy this module, click “Stop,” and paste the module back into StarterPlayer.StarterPlayerScripts, ROBLOX will use that copy of the PlayerModule instead of spawning in a new one. This allows you to “fork” the default scripts.
The click-to-move controller is PlayerModule.ControlModule.ClickToMoveController. Make whatever changes you’d like to that script.
Bear in mind that because ROBLOX will be using your controller instead of spawning in the defaults, the scripts will never get updated, so if there is ever any meaningful update to the default controllers, you may need to port them over. That said, this isn’t a frequent occurrence, and the benefit of customized controllers generally outweighs that cost.