I made a GUI to switch between somethings and i think the way i made it is too long to do because i need to keep adding "else" for each items and i got a lot, can anyone help me figure this out? like a faster way to do it, instead of the need to add each items
function OnClicked()
local items = script.Parent.Parent.ItemName
if items.Value == "None" then
items.Value = "item1"
elseif items.Value == "item1" then
player.Character:findFirstChild(items.Value):remove()
items.Value = "item2"
elseif items.Value == "item2" then
player.Character:findFirstChild(items.Value):remove()
items.Value = "item3"
elseif items.Value == "item3" then
player.Character:findFirstChild(items.Value):remove()
items.Value = "item4"
elseif items.Value == "item4" then
player.Character:findFirstChild(items.Value):remove()
items.Value = "item1"
--etc

1 comment
thats interresting i think i can make this work with it, thanks