Zecrit
|
  |
| Joined: 24 Jan 2013 |
| Total Posts: 2618 |
|
|
| 27 Sep 2014 12:17 PM |
My brain is working very slowly today for some reason and I can't think of how to do this when I would be able to any other day.
Basically just a little function to detect when a players torso is touching a part with a specific name.
Use whatever variables you want, I'll modify it. |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2014 12:23 PM |
function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then print'Humanoid touched a brick' end end
script.Parent.Touched:connect(onTouch)
Here you go, tell me exactly why you need the torso to touch a certain brick name? |
|
|
| Report Abuse |
|
|
ohno1112
|
  |
| Joined: 23 Mar 2013 |
| Total Posts: 833 |
|
|
| 27 Sep 2014 12:25 PM |
make a script and put it anywhere you like. put below code in it.
while true do for i,v in pairs(game.Players:GetChildren()) do if (v.Character) then if not v.Character.Torso:FindFirstChild("Script") then script.Script:Clone().Parent = v.Character.Torso end end end wait(1) end
then, create a script INSIDE the script, and put the code below inside that script.
function touch(hit) if hit.Name == "Yournamehere" then --Yourcodehere end end script.Parent.Touched:connect(touch)
|
|
|
| Report Abuse |
|
|
BetterBe
|
  |
| Joined: 25 Jan 2009 |
| Total Posts: 1034 |
|
|
| 27 Sep 2014 12:26 PM |
| @Faded I was going to reply with a similar script however by my understanding would the OP also need to know if its concurrently touching the torso, not just knowing the moment it does? |
|
|
| Report Abuse |
|
|
Zecrit
|
  |
| Joined: 24 Jan 2013 |
| Total Posts: 2618 |
|
|
| 27 Sep 2014 12:29 PM |
@Faded GUIs and stuff
@Whoever the guy replying to faded was Ja |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2014 12:32 PM |
| @^, I'm very confused on what he meant by that if he actually needed to know the parent's name or my other answer I posted. |
|
|
| Report Abuse |
|
|