Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Don't know where to put the delay before the explosion starts, anyone know how ?

Asked by 6 years ago
Edited 6 years ago

So what i want to do is to when you click an objects it plays a sound, and then it explodes, so i did that :

function clickity(playerWhoClicked)
    wait 0.5 -- The good ol' delay
    local i = 1 
    local exp = Instance.new('Explosion',game.Workspace)
    exp.Name=(i)
    exp.Position = script.Parent.Position
    script.Parent.Parent:Destroy()
    local i = (i + 1)
end

script.Parent.ClickDetector.MouseClick:connect(clickity)

And it only played the sound... but not this scripts, the is a separate script for the sound and the explosion. i need help ! and maybe give me a better working script than this

0
if this is a local script it wont work Gey4Jesus69 2705 — 6y
0
whats the hierarchy of this script? ABK2017 406 — 6y

Answer this question