My script is supposed to make the random image visible and the other not visible for a certain amount of time. For some reason it isn't working and I cant seem to find out why.
Here is the script
plr = script.Parent.Parent.Parent.Parent.Parent income = script.Parent.income --1053468311 -- hitleft --1053474997 -- hitright script.Parent.MouseButton1Click:connect(function() plr.leaderstats.Hits.Value = plr.leaderstats.Hits.Value + income.Value choosepunch = math.random(1,2) if choosepunch==1 then game.StarterGui.ScreenGui.HitRight.Visible= false game.StarterGui.ScreenGui.ImageLabel.Visible= false wait(10) game.StarterGui.ScreenGui.HitRight.Visible= true game.StarterGui.ScreenGui.ImageLabel.Visible= true wait(10) else if choosepunch== 2 then game.StarterGui.ScreenGui.HitLeft.Visible= false game.StarterGui.ScreenGui.ImageLabel.Visible= false wait(5) game.StarterGui.ScreenGui.HitLeft.Visible= true game.StarterGui.ScreenGui.ImageLabel.Visible= true wait(5) end end end)