New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

I need to delete this "Ore" when I click it is + by 15. Help? [Solved]

Asked by 12 days ago
Edited by Feahren 12 days ago

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
0
You did = instead of ==. iiDkOffical 73 — 12d

1 answer

Log in to vote
0
Answered by 12 days ago

On line 17, you used =, this is used to set the value of something, you would use == to check the value of something, hope this helped!

Ad

Answer this question