Hi, i have a problem with my script for selling my item in my server, the condition “if not” don’t work
the print is’nt fire…
while true do
local braceletbois = plr.Backpack:FindFirstChild("Wooden Bracelet")
local collierbois = plr.Backpack:FindFirstChild("Wooden Necklace")
local ceinturebois = plr.Backpack:FindFirstChild("Wooden Belt")
local bouclesbois = plr.Backpack:FindFirstChild("Wooden Earings")
local chaussurebois = plr.Backpack:FindFirstChild("Wooden Shoes")
local money = plr.status.Money
local total = plr.PlayerGui.TotalSell
local sell = game.ServerStorage.loot:Clone()
if chaussurebois then
chaussurebois:Destroy()
total.Value = total.Value + 25
end
if braceletbois then
braceletbois:Destroy()
total.Value = total.Value + 30
end
if collierbois then
collierbois:Destroy()
total.Value = total.Value + 40
end
if bouclesbois then
bouclesbois:Destroy()
total.Value = total.Value + 50
end
if ceinturebois then
ceinturebois:Destroy()
total.Value = total.Value + 65
end
if not chaussurebois and braceletbois and collierbois and bouclesbois and ceinturebois then
print("test")
money.Value = money.Value + total.Value
sell.TextLabel.Text = ("+"..total.Value)
sell.TextLabel.TextColor3 = Color3.fromRGB(255,255,0)
sell.Parent = game.Workspace:WaitForChild(plr.Name).Head
wait(0.1)
total.Value = 0
wait(2)
sell:Destroy()
break
end
wait(0.1)
end