--[[
	Enables or disables character movement (eg. walking, jumping) based on the
	'isEnabled' argument.
	
	This function is called whenever the MerchBooth UI is opened or closed.
]]


local Players = game:GetService("Players")

local function setCharacterMovementEnabled(isEnabled: boolean)
	local playerModule = Players.LocalPlayer.PlayerScripts:FindFirstChild("PlayerModule")

	if playerModule then
		playerModule = require(playerModule)
		playerModule:GetControls():Enable(isEnabled)
	end
end

return setCharacterMovementEnabled
