Where should I start? I don't know much about magnitude but this is my code so far.
for _, i in pairs(game.Players:GetPlayers()) if i == workspace.Part.Magnitude then print("Player is near an object within its radius of 2.53") --Something like this. end end
maggie = (xyz_A-xyz_B).magnitude
-- xyz1 and xyz2 could be "workspace.PartThingy.Position" (as an example)
if maggie <= 2.53 then -- just make sure you can get 2.53 and under using "<=" print(i.." is near an object within its radius of 2.53!") end
maggie = (xyz_A-xyz_B).magnitude for _, i in pairs(game.Players:GetPlayers()) if maggie <= 2.53 then print(i.." is near an object within its radius of 2.53!") end end
and then that same Lua nerd will let you do the rest.
U should try use PlayerDistanceFromCharacter and set the vector point of the object something like this maybe
for _, i in pairs(game.Players:GetChildren()) while true do if i:PlayerDistanceFromCharacter(Vector3.new(number,number,number)) < 2.53 then print("Player is near an object within its radius of 2.53") end end end
not sure if this will work im just guessing might work i guess