this is for make the weapon axe(a tool)
local Player = game.Players.LocalPlayer
local ls = Player:WaitForChild("hiddenstats")
local Scrap = ls:FindFirstChild("Scrap")
local Rubber = ls:FindFirstChild("Rubber")
local Plank = ls:FindFirstChild("Plank")
local Tool = game.ReplicatedStorage.Axe
script.Parent.MouseButton1Click:Connect(function()
if Scrap.Value > 3 then
if Plank.Value > 5 then
Scrap.Value = Scrap.Value - 3
Plank.Value = Plank.Value - 5
Tool:Clone()
Tool.Parent = Player.Backpack
end
end
end)
this is for warn the player he or she have no items
local Player = game.Players.LocalPlayer
local ls = Player:WaitForChild("hiddenstats")
local Scrap = ls:FindFirstChild("Scrap")
local Rubber = ls:FindFirstChild("Rubber")
local Plank = ls:FindFirstChild("Plank")
script.Parent.MouseButton1Click:Connect(function()
if Scrap.Value < 3 then
if Plank.Value < 5 then
script.Parent.Text = "Not Enough Materials!"
wait(1)
script.Parent.Text = "Craft"
end
end
end)

1 comment
In class right now, will try to help later. Does anything show in the output?