So, I have a system where when a player is killed, and they are hostile, they go to jail. However, it wont teleport them to the jail.
function charAdd()
print("respawn")
local char = script.Parent.Parent.Character
if script.Parent.Parent.TeamColor == BrickColor.new("Bright orange") then
script.Parent.Parent.Neutral = false
char:MoveTo(game.Workspace.PrisonBlock.Position + Vector3.new(0,1,0))
print("waiting")
wait(script.Parent.Parent.leaderstats.JailTime.Value)
script.Parent.Parent.TeamColor = BrickColor.new("White")
script.Parent.Parent.Neutral = true
print("out of jail")
script.Parent.Parent.leaderstats.JailTime.Value = 0
char.Humanoid.Health = 0
end
end
script.Parent.Parent.CharacterAdded:Connect(charAdd)

2 comments
You can use MoveTo() as well.
CFrame is just genuinely better I guess