hey so im trying to detect everytime the local player gets farther from the orgin point(0, 0, 0) this is my code right now.
local playerName = player.Name
local char = game.Workspace:WaitForChild(playerName)
local humanoidRootPart = char:WaitForChild("HumanoidRootPart")
local magnitude = (humanoidRootPart.Position - game.Workspace.MainPart.Position).magnitude
spawn(function()
end)
I wanna detect if the player magnitude changes by increments of 10 then ill do something how can i achieve this?