I'm working on an Inventory system, I have run into a problem that basically doesn't make a GUI appear if the player has a BoolValue thats value is true.
Here is the code:
--<< Variables >>--
local plr = game.Players.LocalPlayer
local bool = plr.ShopItems.Knives
--<< Frames >>--
local bg = script.Parent
local knifeinv = bg.Knives
local revinv = bg.Revolver
local abilinv = bg.Abilities
local petinv = bg.Pets
local radioinv = bg.Radios
local newknife = knifeinv.Template:Clone()
if bool.Common.Value == true then
newknife.Visible = true
newknife.Name = "KnifeA"
newknife.Rarity.ImageColor3:FromRGB(43,125,43)
newknife.Text = "Starter"
else
return false
end
if bool.UnCommon.Value == true then
newknife.Visible = true
newknife.Name = "KnifeB"
newknife.Rarity.ImageColor3:FromRGB(43,125,43)
newknife.Text = "Skies"
else
return false
end
If you can help, please do and thank you for taking the time to read this

2 comments
returnsin loops outside of a function's (or module's) scope mean nothing and are therefore uselessIs that my problem? Or is there more to it?