I wanted this to work but there is only 1 line preventing this.
local plr = game.Players.LocalPlayer
local plrgui = plr.PlayerGui
local label = plrgui:FindFirstChild("Testing").Title
local wall = game.Workspace.BrickWall
function Round(Number, Decimals)
Decimals = (Decimals > 0 and Decimals or 0)
Number = Number*(10^Decimals)
local rNum, Dec = math.modf(Number)
if Dec >= .5 then
rNum = rNum + 1
end
return rNum/(10^Decimals)
end
while wait(.001) do
local magnitude = (plr.Character.Torso.Position - wall.Position).magnitude
label.Text = "Current Distance From Brick Wall: "..Round(magnitude,1)
end
Error: Players.Player.PlayerGui.Magitude Script:3: attempt to index a nil value Help?

3 comments
The error is on line 3, so line is is the label value. Make sure that you have the correct order and it is in the right heirachy
it is
Well then something must be missing. Either this isn't the right script, or you just add :WaitForChild