Skin System Not Loading Skins

I’m currently working on a skin system using folders inside the player! in order to do this im using the client to display skins the player owns, while i use remote events to the player to change if the player has the skin equipped or just owned. For some reason it is not displaying the equip button even though it should! If you have a solution please respond.

local function button1()
	
	local blueswordowned = false
	
	infoframe.Visible = true
	
	skinname.Text = "Blue Sword!"
	
	ObtainWays.Text = "Buy From The Shop"
	
	description.Text = "Its Blue!"
	
	while player:WaitForChild("SkinsOwned") do
		wait(1)
		if player:WaitForChild("SkinsOwned"):WaitForChild("BlueSwordSkin") then
			blueswordowned = true
			break
		end
	end
	
	while true do
		wait(1)
		if blueswordowned then
			equipbutton.Visible = true

			local function equipblue()
				skinevents.BlueSwordSkinEquip:FireServer()
			end

			equipbutton.MouseButton1Click:Connect(equipblue)
		end
	end
end

script is a local script placed in a skins frame

Bump 2… For The Post… Word Limit…

Try printing under equipbutton.Visible = true to see if the script reaches that area