So, I have a script the looks for a StringValue named "Tags" and if the Tags is = 0 then it will upgrade the ore once. Well, that is what I thought, but it still does upgrades the ore more than once. How do I change the script so that it will always look for the "Tags" value before upgrading the ore? Any help will be appreciated! Thanks. <3
wait(0.01)
script.Parent.Upgrade.Touched:connect(function(hit)
if hit:FindFirstChild("Cash","Tags" == 0 ) then
hit.Tags.Value = hit.Tags.Value + 1
hit.Cash.Value = hit.Cash.Value + 2
end
end)

1 comment
I see where you are coming from as when the ore value is worth ‘$7’, it would upgrade it and that’s assuming we have a ore that is worth ‘$7’, what if the ore value isn’t worth ‘$7’? It wouldn’t upgrade the ore unless it is worth exactly ‘$7’.What my idea is the upgrader will look for this thing named ‘ore’. When the ore hits the upgrader, the name will be changed to ‘ore2’ meaning it would not b