So basically I'm trying to get my Purchase button to appear whenever the Players "Ownership" value is false, and the equip button should appear when the "Ownership" value is true. But the Equip button is appearing even if the ownership value is set to false?? Any ideas why?!

Local Script In Button


while wait() do
	
	
	local Player = game.Players.LocalPlayer
	
	local OwnershipTrue = Player:WaitForChild("PouchesOwned")
	
	if OwnershipTrue then
		
		
		local PO2 = OwnershipTrue:FindFirstChild("Pouch2o")
		
		if PO2.Value == true then
			
			script.Parent.Visible = true
			script.Parent.Parent.Purchase.Visible = false
			
			
		elseif PO2.Value == false then
			
			script.Parent.Visible = true
			script.Parent.Parent.Purchase.Visible = false
			
		else
			
			print("Error")
			
			wait(10)
			
			
		end
		
	end
	
	
end

ServerScript

local moduleShortener = require(game.ReplicatedStorage.Modules.NumericalShortener)


game.Players.PlayerAdded:Connect(function(plr)
	
  	local PE = plr:WaitForChild("PouchesOwned")

	local PO1 = Instance.new("BoolValue",PE)
	PO1.Name = "Pouch1o"
	PO1.Value = true
	
	local PO2 = Instance.new("BoolValue",PE)
	PO2.Name = "Pouch2o"
	PO2.Value = false -- It's False!
	
	local PO3 = Instance.new("BoolValue",PE)
	PO3.Name = "Pouch3o"
	PO3.Value = false
	
	local PO4 = Instance.new("BoolValue",PE)
	PO4.Name = "Pouch4o"
	PO4.Value = false
	
	local PO5 = Instance.new("BoolValue",PE)
	PO5.Name = "Pouch5o"
	PO5.Value = false
	
end)

1 comment

0

Tried changing it to PO2 minus the ".Value" , it gave me the else statement