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?
Try moving the player upwards, because if you set the player's position to the spawn points position, and if the spawn is on the ground, that means half the player's body too will be underground.
player.Character.HumanoidRootPart.CFrame = CFrame.new(game.Workspace.citizen.Position + vector3.new(0, 10, 0))