Switching characters in game

Hello everyone at this moment I’m working on a football game and I need a player switching with characters like in FIFA or PES

local char = game.Players.LocalPlayer.Character
local char1 = game.Workspace.char
local player = game.Players.LocalPlayer


local UIS = game:GetService("UserInputService")
local ControllerService = game:GetService("ControllerService")

local keybind = Enum.KeyCode.Q
local HumanoidController = ControllerService:FindFirstChildOfClass("HumanoidController")

local playerMod = require(game:GetService("Players").LocalPlayer.PlayerScripts:WaitForChild("PlayerModule"))
local controls = playerMod:GetControls()

local camera = workspace.CurrentCamera

UIS.InputBegan:Connect(function()
	if UIS:IsKeyDown(keybind) then
		char.Humanoid.Parent = char1
		char1.Humanoid.Parent = char
	end
end)

something I did at this moment but it wont work correctly