of     1   

ridiculessam28
#127551846Saturday, March 08, 2014 2:44 PM GMT

How would I find the play that touched the brick?
DataStore
#127552145Saturday, March 08, 2014 2:49 PM GMT

You're referring to the "Touched" event. The event 'passes on' the part that touched it to the connected function. One way to get the player, given the player's character, would be to use the "GetPlayerFromCharacter" method. http://wiki.roblox.com/index.php?title=GetPlayerFromCharacter
ridiculessam28
#127556856Saturday, March 08, 2014 3:56 PM GMT

How would I get the character?
Marolex
#127557007Saturday, March 08, 2014 3:57 PM GMT

Character is the hit so script.Parent.Touched:connect(hit) game.Players:GetPlayerFromCharacter(hit) --code end)
maxomega3
#127557362Saturday, March 08, 2014 4:02 PM GMT

hit a common parameter in a .Touched event. It is the brick that touched that brick in order to trigger the function. If a character hits it with their limbs, hit.Parent would mean their character, no? Have to do a check, because that won't always be a character: if hit.Parent:FindFirstChild ('Humanoid') then game.Players:GetPlayerFromCharacter (hit.Parent)
warspyking
#127558971Saturday, March 08, 2014 4:21 PM GMT

--Example that covers everything; Brick = game.Workspace.Part --Change this to the brick path example would be the scripts parent (script.Parent) Brick.Touched:connect(function(hit) Hum = hit.Parent:FindFirstChild("Humanoid") if (Hum ~= nil) then Char = hit.Parent Player = game.Players:GetPlayerFromCharacter(Char) --Continue what you want to do end end) --Hope that explains it...

    of     1