I want a message to print all players within 100 studs of a player, is there some sort of event that can check all the players within 100 studs of another player?
Here's some basic pseudo code of the logic. It is pretty much "guess and check". You'll have to come up with the full logic yourself. Unfortunately, there is no event to my knowledge that would allow you to know all the players in a 100 stud radius.
while wait() do for _,player in pairs(Players:GetPlayer()) do --We go through all players. if (player.Character.Torso.Position - LocalPlayer.Character.Torso.Position).magnitude <= 100 then --Execute logic if the magnitude is less than or equal to 100. print(player.Name .. " is in the area.") end end end
Once again, you'll have to complete the logic but that's a general idea. What we're doing in the script is subtracting the vector values since Vector3 is quite clearly a vector. Taking a trigonometry course may help to understand this concept better. Vector3 is pretty much a point on a 3D plane i.e. X, Y, and Z.
Magnitude is getting the X, Y, and Z and getting the distance from that through the hypotenuse. Similar to the concept of Pythagorean Theorem.
x^2 + y^2 + z^2 = v^2