I have this code where when I choose a team it teleports to that team's spawn location, but when it teleports, the humanoid gets stuck in the spawn location.
local player = game.Players.LocalPlayer
script.Parent.Parent.Enabled = true
script.Parent.MouseButton1Click:Connect(function()
player.Team = game.Teams.Citizen
script.Parent.Parent.Enabled = false
player.Character.HumanoidRootPart.CFrame = CFrame.new(game.Workspace.citizen.Position)
end)
How do I fix this problem?
