All heirarchy is correct, There are NO errors in the output.
Please Help D:
Player = game.Players.LocalPlayer
leaderstats = Player:WaitForChild('leaderstats')
gold = leaderstats:WaitForChild('Sticks')
Item2 = leaderstats:WaitForChild('Wood')
Product = leaderstats:WaitForChild('WoodenAxe')
craftbar = script.Parent.Parent.Parent.Parent.CraftBar.BarOutline.Bar
Waittime = 2.5 -- Time between each loading session
SEC = script.Parent.Parent.Parent.SomethingElseCrafting
AHO = script.Parent.AlreadyHaveOne
Occupied = script.Parent.Parent.Parent.Occupied
Thing = script.Parent.Parent.Parent.Parent.Parent.Inventory.Frame.Item3.EquipOrUnequip:WaitForChild('HasBought')
Wow = Thing.Value
function Flash()
Occupied.Visible = true
wait(2)
Occupied.Visible = false
end
function Crafting()
wait(Waittime)
craftbar.Size = UDim2.new(0.25, 0, 1, 0)
wait(Waittime)
craftbar.Size = UDim2.new(0.5, 0, 1, 0)
wait(Waittime)
craftbar.Size = UDim2.new(0.75, 0, 1, 0)
wait(Waittime)
craftbar.Size = UDim2.new(1, 0, 1, 0)
end
function Reset()
craftbar.Size = UDim2.new(0, 0, 1, 0)
end
function Check()
local Item = script.Parent.Parent.Item.ItemName
local Item2 = Item2
print("Checking")
if gold.Value >= 2 and Item2.Value >=3 and SEC.Value == false and AHO.Value == false then
print("Starting")
gold.Value = gold.Value - 2
Item2.Value = Item2.Value - 3
print("Taking Away Items")
wait(.1)
SEC.Value = true
print("Crafting")
Crafting()
wait(Waittime)
print("Reseting")
Reset()
script.Parent.Sound:Play()
print("Almost Done")
SEC.Value = false
AHO.Value = true
print("DONE!!")
Thing.Value = true --Problem
print(tostring(Wow))
elseif gold.Value < 2 and Item2.Value < 3 then
print("NOT ENOUGH!!")
elseif SEC.Value == true then
Flash()
end
end
script.Parent.MouseButton1Click:connect(Check)
