--- Script Of Humanoid ---
script.Parent.Died:Connect(function()
game.ReplicatedStorage.MinionsFound.Value += 1
end)
--- Script Of MainScript ---
local MinionsFound = game.ReplicatedStorage.MinionsFound
local MinionsModel = game.ReplicatedStorage.MinionsModel
MinionsModel.Parent = workspace
SetObjectives("Minions Found: "..MinionsFound.Value)
while wait() do
SetObjectives("Minions Found: "..MinionsFound.Value)
if MinionsFound.Value == 4 then
wait(1)
break
end
end
ClearObjectives()
MinionsModel:Destroy()