I am trying to get a radius from a local player within an NPC any help? I made this magnitude script but you guys are probably looking at it thinking its a joke.
local Player = game.Players.LocalPlayer.Character local Zombie = game.Workspace.Zombie
if (Player.Torso.Position - Zombie.Torso.Position).magnitude <= 10 then print("it works") end
I will start you off by saying that you only check for the distance once, meaning if the player moves, it wont print again. What you could do is but that if
statement in a while wait() do
statement.
while wait() do if (Player.Torso.Position - Zombie.Torso.Position).magnitude <= 10 then print("It works!") end end