I want to know how to search for a player in a certian radius around a Brick
COMMUNITY QUESTION
How to detect for a player?
1 answer
Try this! Just put an invisible (transparent) brick around the visible one and put this script in it:
script.Parent.Touched:Connect(function(touched)
if touched.Parent:FindFirstChild("Humanoid") then
print("Player! Name:"..touched.Parent.Name)
local Player = game.Players:FindFirstChild(touched.Parent.Name)
--Your code here! Feel free to use the variable "Player" as a reference to the player!
end
end
Hint: The invisible brick is the "Radius" around the block and can detect a player. Just make the brick bigger to make the radius bigger. To see a picture of this I have made for you, click the link below! http://cadegrenade.000webhostapp.com/helppicture1.png
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
oh god
yes, it is confusing, but it is the simplest way that it can work