|
| 04 Sep 2011 11:31 AM |
I have this:
local t = humanoid.Parent:findFirstChild("Torso")
?? |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2011 11:32 AM |
| game.Players:GetPlayerFromCharacter(game.Players.LocalPlayer)--localscript |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2011 11:33 AM |
| wheres the Torso part? where do I put it in? |
|
|
| Report Abuse |
|
|
Fl0x
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 5169 |
|
|
| 04 Sep 2011 11:34 AM |
@Cach That wouldn't work, you have to give the character as parameter for this method. Also, that doesn't tell him how to find the torso. To be honest, you aren't really helpful. Also, local t = humanoid.Parent:findFirstChild("Torso") Should be fine, just make sure humanoid is defined. |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2011 11:37 AM |
Aww, I don't have it defined...
hmm, can you give me and example how I can define it?
|
|
|
| Report Abuse |
|
|
| |
|
Fl0x
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 5169 |
|
|
| 04 Sep 2011 11:39 AM |
workspace.Part.Touched:connect(function(p) if p.Parent:findFirstChild("Humanoid") then t=p.Torso end end)
Or for a specific player
workspace["Player Name here"].Torso |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2011 11:40 AM |
lololol
fL0x
thats a new one |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2011 11:42 AM |
So..:
function onTouch(part) workspace.Part.Touched:connect(function(p) if p.Parent:findFirstChild("Humanoid") then t=p.Torso end end) local t = Humanoid.Parent:findFirstChild("Torso") if t~=nil then local c = Instance.new("Part") c.CanCollide = false c.Anchored = true c.BrickColor = BrickColor.new("Really black") c.BrickShape = BrickShape.new("ball") c.BrickSize = Bricksize.new(9,9,9) end end
script.Parent.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2011 11:42 AM |
| game.Workspace.Person299.Torso |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2011 11:44 AM |
I don't want a certain player.. >.>
I want a "if everyone touched it, it will happend to them." |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2011 11:47 AM |
output:
Workspace.Part.Script:7: attempt to index global 'Humanoid' (a nil value)
|
|
|
| Report Abuse |
|
|