Well, the label is not showing when the button is pressed! Script:
-- VARIABLES
local Player = game:GetService("Players").LocalPlayer
local Storage = game:GetService("ReplicatedStorage"):FindFirstChild("Storage")
local Swords = Storage:WaitForChild("Swords")
local Database = Player:WaitForChild("Database")
local ValueFolder = Database:FindFirstChild("Value_Inv")
local MeltingLabel = script.Parent.Parent.Parent.Parent:FindFirstChild("MeltingInfo")
local meltingeffect = script.Parent.Parent.Parent.Parent:FindFirstChild("Melting")
-- CODE
script.Parent.MouseButton1Click:Connect(function()
local debounce = false
if ValueFolder.IronOre_Value.Value >= 1 then
if not debounce then
debounce = true
ValueFolder.IronOre_Value.Value = ValueFolder.IronOre_Value.Value - 1
wait()
MeltingLabel.Visible = true
meltingeffect:Play()
wait(3)
meltingeffect:Stop()
MeltingLabel.Visible = false
ValueFolder.IronIngot_Value.Value = ValueFolder.IronIngot_Value.Value + 1
end
else
-- Code here
end
wait(1)
debounce = false
end)
Well, the output is *attempt to index upvalue 'MeltingLabel" (a nil value)! Line 19' *
Explorer ->> https://imgur.com/a/CsCIp0N

1 comment
Thanks mate, I really appriciate your answer cuz I totaly forgot about WaitForChild option... Thank you!