Hello, I am trying to disable player movement while using the Humanoid:MoveTo
method.
However, nothing seems to work. It needs to be server-sided so other players can see that player moving, however, I’ve tried firing events, etc, but nothing seems to work.
script.Parent.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
print('worked')
game.ReplicatedStorage.yes:FireClient(player)
wait()
player.Character.Humanoid:MoveTo(workspace.Folder.One.Position)
end
end)
game.ReplicatedStorage.yes.OnClientEvent:Connect(function()
local Controls = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")):GetControls()---GetControls
Controls:Disable()
end)