Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Alternative to Humanoid:MoveTo() for a local script?

Asked by 5 years ago

Recently, I've been developing an engine for turn-based battle mechanics, very similar to Paper Mario. The extremely early and primitive engine can be found here if you would like to review it. The first tactic I've been trying to script is a jumping mechanic where your character jumps on the enemy, again, similar to Paper Mario. However, the physical battle is only on the client-side, while only being emulated by the server. The only problem with this model is that Humanoid:MoveTo() only works on the server-side(?), and I can't move either of the two characters on the server-side without it replicating on all clients. Is there a solution to this problem? I have no idea how to move each character any other effective way.

1 answer

Log in to vote
0
Answered by 5 years ago

You can listen to input from the client and send it through a RE. The server then will use :MoveTo() itself.

You can also very easily listen to that input by using Roblox's built-in control modules:

local Player = game.Players.LocalPlayer
local ControlModule = require(Player:WaitForChild "PlayerScripts" :WaitForChild "PlayerModule" :WaitForChild "ControlModule" )
local MoveVector = ControlModule:GetMoveVector()
0
Thanks! I'll try adding this in tomorrow. Andy_Wirus 72 — 5y
0
Glad I was able to help :D GGRBXLuaGG 417 — 5y
Ad

Answer this question