How do you make it so that a brick or model can tell when a part is near them (say, 50 studs away). I'm really stumped by this problem, although I suspect it has something to do with using the Magnitude between bricks.
I'm creating a script so that when a part is x far away, a stuff happens.
Yes, you would use Magnitude to get the distance between two parts. I provided a script to help you out.
For a player: This would be a local script in Workspace. This will work for each individual player.
torso = game.Players.LocalPlayer.Character.Torso part2 = game.Workspace.Part2 if (torso.Position - part2.Position).magnitude >= 40) then print('It is 40 studs away!!!') end