my shop gui doesn't work. Help?

local repstorage = game:GetService("ReplicatedStorage")
local armory = repstorage:WaitForChild("Armory")
local armor = armory:WaitForChild("Armor")
local localplayer = game.Players.LocalPlayer
local materials = localplayer:WaitForChild("Materials")

function BuyObj() 
if materials and materials.Shrooms.Value > 1 and materials.Wood > 1 or 	script.Parent.Unlocked.Value == true then
script.Parent.Unlocked.Value = true
armor.Parent = game.Workspace
print("Obj")
end
end

script.Parent.MouseButton1Click:connect(BuyObj)

no errors appear in the output

2 comments

0

Is Filtering Enabled?

1

Line 8, add .Value to materials.Wood