local ReplicatedStorage = game:GetService("ReplicatedStorage") local InteractItem = ReplicatedStorage:WaitForChild("InteractItem") local TroopsFolder = ReplicatedStorage:WaitForChild("Assets"):WaitForChild("Troops") local function buyTower(towerName) local args = { towerName } local success, err = pcall(function() InteractItem:InvokeServer(unpack(args)) end) if success then print("Bought tower:", towerName) else warn("Failed to buy tower:", towerName, err) end end for _, tower in ipairs(TroopsFolder:GetChildren()) do buyTower(tower.Name) task.wait(0.2) end