In my script when I click the image label it should pick between 2 images(I am going to add more). But it only ever picks the first option and never the second. Any reason why ??
plr = script.Parent.Parent.Parent.Parent.Parent
income = script.Parent.income
local choosepunch =math.random(1,2)
--1053468311 -- hitleft
--1053474997 -- hitright
script.Parent.MouseButton1Click:connect(function()
plr.leaderstats.Hits.Value = plr.leaderstats.Hits.Value + income.Value
if choosepunch==1 then
script.Parent.Parent.Parent.HitRight.Visible= false
script.Parent.Parent.Visible= false
wait(.5)
script.Parent.Parent.Parent.HitRight.Visible= true
script.Parent.Parent.Visible= true
wait(.5)
elseif choosepunch== 2 then
script.Parent.Parent.Parent.HitLeft.Visible= false
script.Parent.Parent.Visible= false
wait(.5)
script.Parent.Parent.Parent.HitLeft.Visible= true
script.Parent.Parent.Visible= true
wait(.5)
end
end)

3 comments
Thanks for the help !
Wait what if I want to add more options for it to choose from ??
then increase the second parameter of math.random