been trying to figure it out for a while, i know what im trying to do but i just dont know how to get it. its a crafting script where it figures out the price of the item and then will craft it.
please help if you can :)
script.Parent.MouseButton1Click:Connect(function(player)
for _, kids in pairs(script.Parent.Parent.recipe:GetChildren()) do
if kids.ClassName == ("IntValue") then
local item = kids.Name
local price = kids.Value
-- heres where im lost
local items = game.Players.LocalPlayer.PlayerGui.ScreenGui.inv.ImageLabel.Frame:GetChildren()
local num = #items
print (num)
if num >= price then
--haven't finished this part yet
game.ReplicatedStorage.crafting.sendoff:FireServer(item, price)
end
end
end
end)

1 comment
no ive already worked out the number, im trying to figure out how to get a specific item as there are 2 other things inside (sorry for not specifying) that isnt wood