| |
|
|
| 05 Nov 2013 06:23 AM |
function touch(hit) plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr then Instance.new("Explosion", script.Parent) end end
script.Parent.Touched:connect(touch) |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2013 07:39 AM |
He dun't say on contact with a player's character. He just said on contact. Derefore
script.Parent.Touched:connect(function() Instance.new('Explosion', workspace).Position = script.Parent.Position end) |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2013 07:43 AM |
I don't think getting the player is going to make the brick explode on the humanoid. And put the script into the brick.
script.Parent.Touched:connect(function(hit) hum = hit.Parent:findFirstChild("Humanoid") if hum then ex = Instance.new("Explosion") ex.Position = script.Parent.Position end end)
and if you don't want it to explode when a humanoid touches this script will mke the brick explode if anything touches the brick
script.Parent.Touched:connect(function(hit) ex = Instance.new("Explosion") ex.Position = script.Parent.Position end) |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2013 07:48 AM |
| noobgun he specifically said on contact. He didn't mention which object can or cannot trigger the landmine. Derefore, your first script was unnecessary. |
|
|
| Report Abuse |
|
|