Code down here.
local clickdetector = script.Parent:WaitForChild("ClickDetector")
clickdetector.MouseClick:Connect(function()
_G.orevalue = _G.orevalue + 5
workspace.Ore.SurfaceGui.TextLabel.Text = (_G.orevalue.. " Ore")
script.Parent.ClickDetector.MaxActivationDistance = 0
wait(1)
script.Parent.ClickDetector.MaxActivationDistance = 32
end)
-- down here is the problemo!
if _G.orevalue = _G.orevalue + 15 do
script.Parent:Destroy()
end

1 comment
You did = instead of ==.