So I am trying to make a depth counter and I need the depth to increase by one every time the players Y axis is increased or decreased by 6 studs. Everything else works.
Ignore where it subtracts the big number, that is so the depth says 0 when spawned in.
local player = game.Players.LocalPlayer
while wait() do
local playerDepth = math.abs(math.floor(player.Character.HumanoidRootPart.Position.Y - 16417.1))
script.Parent.Text = "Depth: "..playerDepth
end

1 comment
I don't understand