Trying to make a explosion sound when the bomb explodes but it wont work. Heres the script i used:
local tool = script.Parent
local handle = tool:WaitForChild("Handle")
local remote = tool:WaitForChild("RemoteEvent")
remote.OnServerEvent:Connect(function(player, pos)
-- Play activation sound on server (for all players to hear)
local activationSound = tool:FindFirstChild("teto that kills people")
if activationSound and activationSound:IsA("Sound") then
local soundClone = activationSound:Clone()
soundClone.Parent = workspace
soundClone.PlayOnRemove = false
soundClone:Play()
game:GetService("Debris"):AddItem(soundClone, soundClone.TimeLength)
end
local TetoBomb = handle:Clone()
TetoBomb.CanCollide = true
TetoBomb.CFrame = CFrame.new(handle.Position, pos)
TetoBomb.Parent = workspace
local BV = Instance.new("BodyVelocity")
BV.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
BV.Velocity = TetoBomb.CFrame.LookVector * 100
BV.Parent = TetoBomb
wait(.1)
TetoBomb.BodyVelocity:Destroy()
wait(3)
local explosion = Instance.new("Explosion")
explosion.BlastRadius = 10
explosion.Position = TetoBomb.Position
explosion.Parent = workspace
TetoBomb:Destroy()
end)