Ok so I'm working on a small thing that uses magnitude. Basically in workspace there's a folder that contains parts which are all named the same thing however the parts are spread around the map. The local script gets the folder and checks whether the name of the part is "Hello," if the name is "Hello," then the local script makes a simple text label visible. Hope this kind of gives you an idea of what I'm trying to do.
while wait() do
local checkPart = game.Workspace.Wow:GetChildren() --Folder in workspace
if checkPart.Name == "Hello" then
local dis = (game.Workspace.checkPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude
if dis <= 10 then
script.Parent.TextLabel.Visible = true
wait()
end
if dis >= 9 then
script.Parent.TextLabel.Visible = false
wait()
end
wait()
end
wait()
end

1 comment
if you are waiting until the part is a certain distance from the player use "repeat; (code here); until ".. Seems more of an >>XY problem<< as you can easily check if .magnitude works by printing it out.