Anyone know how to make something wait but it only effects one part of the script?

I’m creating an ATM robbery script but and I want it so it will say that there is suspicious activity happening then after 10 seconds it will say there is an ATM robbery but when I make it wait it makes everything else wait so I want it so it will just make the alert wait.

Thanks.

Just put your wait and your alert in new thread


function stratBreak()
    Print("1")

    Citizen.CreateThread(function()
        Wait(10 * 1000)
        Print("3")
    end)

    Print("2")
end
1 Like

It works thank you so much I’ve literally been trying to find this for hours.