I was making a script where it would choose a random number out of 2 but to do it I had to do elseif and I want the else if to end so I can do an extra line of script even if the second one is chosen my script is:]
local function onbuttonactivated() `roblox = math.random(1,2) if roblox == 1 then print (ysy) elseif roblox == 2 then print (yly) print ("k")` button.Activated:Connect(onButtonActivated)
I want to print k even if it is one I tried skipping some lines but it didn't work
how do I do this?
end
:
local roblox = math.random(1, 2) if roblox == 1 then -- do stuff exclusive to roblox == 1 elseif roblox == 2 then -- could just use `else`; it can only be 1 or 2 -- do stuff exclusive to roblox == 2 end -- do stuff outside of the if statement