this is basically the question
You can easily achieve this by having a .Died
event connected to a function which simply adds one, and connecting that event to every humanoid you want to count for.
E.G.
local Folder = workspace.Dummies for i,part in pairs(Folder:GetDescendants()) do if part:IsA("Humanoid") then part.Died:Connect(function() --Whatever your counter system is end) end end
Hope this helps! :)
So put this in a local script
local RS = game:GetService("ReplicatedStorage local Players = game:GetService("Players") local Player = Players.LocalPlayer local Human = Player.Humanoid -- or something I cant remember get the humanoid here tho if Human.Health == 0 then Player.LeaderStats.Coins = Player.LeaderStats.Coins + 1 end
something like that its a rough draft but gives u a very good idea at what I'm getting at :thumbs_up: