I want the function to print("HERE") when the brick is 5 studs away, but when I print the magnitude the value is returning the same everytime the player moves closer to the part. Please help. wait(1)
plr = game.Workspace:findFirstChild(game.Workspace.PlayerName.Value)-- The player
pt1 = plr.Torso.Position
mag = (pt1 - script.Parent.Position).magnitude
plr.Humanoid.Running:connect(function(speed)
print(mag)
if mag <= 15 then
print("HERE")
end
end)

2 comments
I'll try
Thanks