-- Character is not detected the first time player joins the game so we use another function which waits until the character gets added.
-- Waits until an event from server so the values are got. Then sets player position.

local Character = Player.Character or Player.CharacterAdded:Wait()