Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to detect for a player?

I want to know how to search for a player in a certian radius around a Brick

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

2 comments

0

oh god

0

yes, it is confusing, but it is the simplest way that it can work

This discussion is preserved as it was. New answers, comments, and votes are closed.