I'm editing the entire question: So I found this creator tutorial, but I have no idea where to put the script. Do i put it somewhere here?
if skp_0 then if skp_0.Team ~= SKP_0.Team or skp_0.Neutral then local skp_t = Instance.new("ObjectValue") skp_t.Name = "creator" skp_t.Value = SKP_0 skp_t.Parent= SKP_1 game.Debris:AddItem(skp_t, 1) SKP_1:TakeDamage(skp_1) return; end; if not gameRules.TeamKill then return; end; local skp_t = Instance.new("ObjectValue") skp_t.Name = "creator" skp_t.Value = SKP_0 skp_t.Parent= SKP_1 game.Debris:AddItem(skp_t, 1) SKP_1:TakeDamage(skp_1 * gameRules.TeamDmgMult) return; end local skp_t = Instance.new("ObjectValue") skp_t.Name = "creator" skp_t.Value = SKP_0 skp_t.Parent= SKP_1 game.Debris:AddItem(skp_t, 1) SKP_1:TakeDamage(skp_1) return; end
or here?
function UpdateLog(Player,humanoid) local tag = humanoid:findFirstChild("creator") if tag ~= nil then local hours = os.date("*t")["hour"] local mins = os.date("*t")["min"] local sec = os.date("*t")["sec"] local TagType = tag:findFirstChild("type") if tag.Value.Name == Player.Name then local String = Player.Name.." Died | "..hours..":"..mins..":"..sec table.insert(CombatLog,String) else local String = tag.Value.Name.." Killed "..Player.Name.." | "..hours..":"..mins..":"..sec table.insert(CombatLog,String) end if #CombatLog > 50 then Backup = Backup + 1 warn("ACS: Cleaning Combat Log | Backup: "..Backup) warn(CombatLog) CombatLog = {} end end end
You can use creator tags
this might help https://devforum.roblox.com/t/how-to-use-creator-tag/1728641
Make a script in ServerScriptService, and when a player died, it will check if it has a creator tag inside its Humanoid. And if it does, it will add kills to the player who killed them.
local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) local Humanoid = Character:WaitForChild("Humanoid") Humanoid.Died:Connect(function() local Tag = Humanoid:FindFirstChild("creator") if Tag and Tag:IsA("ObjectValue") and Tag.Value then local otherPlayer = Tag.Value local otherLeaderstats = otherPlayer:WaitForChild("leaderstats") otherLeaderstats:WaitForChild("Kills").Value += 1 end end) end) end)