I'm making a food simulator and i made a pizza. every time you activate tool it adds +1 to int value, how to make the tool destroy after the int value value reaches 3?? I really need your help guys
Tool = script.Parent -- Tool TimesActivated = 0 -- The value. Tool.Activated:Connect(function() -- Fires whenever the tool is activated. if TimesActivated > 2 then --Checks if it is over the value of 2! Tool:Destroy() -- Removes the tool. else TimesActivated=TimesActivated+1 -- Increases the value. end end)