My bullet keeps respawning
#1
[lua]t = script.Parent

function FIREINTHEHOLE()
if game.World:getChild("Bullet") ~= nil then
game.World:getChild("Bullet"):remove()
end
script.Parent.Texture = "http://desmond.imageshack.us/Himg217/scaled.php?server=217&filename=guntexture0002.png&res=gal"
local e = t.Bullet:clone()
local R = t:getAngle()
e.Rotation = R - 90
e.Parent = game.World
sleep(0.3)
script.Parent.Texture = "http://desmond.imageshack.us/Himg59/scaled.php?server=59&filename=guntexture0001.png&res=gal"
sleep(4.7)
e:remove()
end

link(t.MouseDown, FIREINTHEHOLE)[/lua]


The bullet just keeps respawning every 5 seconds and it doesn't disappear when I MouseDown
Reply
#2
Dats cuz you just keep cloning a bullet and then after five seconds you destroy the clone.
Reply
#3
But shouldn't it only clone my bullet when I MouseDown, rather than looping?
Reply
#4
When you mouse down, it clones it, waits five seconds and then removes it...
Reply
#5
Exactly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)