KingJackoJoin Date: 2008-06-20 Post Count: 3944 |
bullet = script.Parent
wait(.1)
function staff(HIT)
local e = Instance.new("Explosion",Game.Workspace)
e.Name = "Staff"
e.Position = Vector3.new(bullet.Position)
end
script.Parent.Touched:connect(staff)
Sometimes the bullet just goes throught a brick that has CanCollide true. The wait(.1) is needed because i am cloning a brick and putting it in the brick that was cloned, so it would just go off because it was cloned.
|
|
KingJackoJoin Date: 2008-06-20 Post Count: 3944 |
bump |
|
128GBJoin Date: 2014-04-17 Post Count: 8056 |
Bullet is not defined. |
|
|
|
128GBJoin Date: 2014-04-17 Post Count: 8056 |
'not sure if this matters, but I'm sure HIT should be lowercase'
Hit can be hit Hit HIt HIT HiT hIt
Or even
OMG_THE_THING_THAT_HIT_ME
Its a argument it can be basically anything you want...
The bullet is probably going too fast for the script to register the touch |
|
KingJackoJoin Date: 2008-06-20 Post Count: 3944 |
cant be that, i have the speed on 100 and i see it hit the brick and then the explosion far below. Oh btw im using BodyMovers, idk if i said that or not. |
|
128GBJoin Date: 2014-04-17 Post Count: 8056 |
Can I have a model of the gun? |
|
|
KingJackoJoin Date: 2008-06-20 Post Count: 3944 |
http://www.roblox.com/Staff-item?id=168698615
put the external script and bodyvelocity in lighting and the tool in starterpack. |
|
128GBJoin Date: 2014-04-17 Post Count: 8056 |
bullet = script.Parent
--[[wait(.1)
function staff(HIT)
local e = Instance.new("Explosion")
e.Parent = Game.Workspace
e.Name = "Staff"
e.Position = bullet.Position
end
script.Parent.Touched:connect(staff)--]]
wait(.1)
function staff(HIT)
local e = Instance.new("Explosion",Game.Workspace)
e.Name = "Staff"
e.Position = bullet.Position
end
script.Parent.Touched:connect(staff) |
|
KingJackoJoin Date: 2008-06-20 Post Count: 3944 |
Yes? The first one was there if the other one doesnt work as well. |
|
128GBJoin Date: 2014-04-17 Post Count: 8056 |
I fixed your script...
You had that comment there so I just left it there, I tested it, it works. |
|
KingJackoJoin Date: 2008-06-20 Post Count: 3944 |
oh thanks. I didnt pick up the difference hah. |
|