I want to make a time bomb spawn inside my game but for some reason it spawns at a weird location, i’ve made the normal bomb and it works just fine. it spawns in front of the player.
Here’s a video of the bug:
tool.Activated:Connect(function()
if not projectilemode then
if not R then
if not db then
timeractive = true
db = true
local bomb = script.Parent.Handle:Clone()
A.BombFuse.Looped = true
A.BombFuse:Play()
bomb.Anchored = false
bomb.Parent = workspace
bomb.CanCollide = true
if timeractive then
repeat
wait(1)
timer -= 1
until timer == 0 or not timeractive
end
if timer == 0 then
A.BombFuse:Stop()
createExplosion(bomb)
A.ExplosionSFX:Play()
bomb:Destroy()
wait(.1)
timer = 2
end
wait(1)
db = false
end
else
if not db then
print("test")
db = true
local bomb = Handle2:Clone()
bomb.Anchored = false
bomb.Parent = workspace
bomb.CanCollide = true
task.wait(1)
db = false
end
end
else
--ignore these
if not R then
script.Parent.Handle.Transparency = 1
caster.LengthChanged:Connect(onLengthChanged)
caster.RayHit:Connect(onRayHit)
fireRE.OnServerEvent:Connect(function(player,mousepos)
fire(player,mousepos)
end)
else
print("TimeBomb G")
end
end
end)
Will greatly appreciate any help!