local NewPart=workspace.Main.Tycoon3.NewParts
local Conveyor=workspace.Main.Tycoon3.MainItems.Conveyor.Lava.Position
local Conveyor1=workspace.Main.Tycoon3.BuyingItems.Conveyor.Lava.Position
local Tool=script.Parent
Tool.Activated:Connect(function()
while task.wait(0) do
local NewPart=Instance.new('Part',NewPart)
NewPart.Position=Conveyor and Conveyor1
NewPart.Size=Vector3.new(1,1,1)
local Cash=Instance.new('NumberValue',NewPart)
Cash.Name='CashValue'
Cash.Value=1
end)```
#how can i make this work when player presses a button not activate
8 messages · Page 1 of 1 (latest)
what do you mean by when player presses a button no activate? like do you not want it to activate im confused here
So basically its a tool to drop parts in that position for lava to get cash
So when player gets the tool it starts then when player removes tool from inventory it stops
Like activate and deactivate
So what can I do for the tool.Deactivate
so are you asking for the loop to stop when the player unequips the tool correct?
Yes