Continuing the discussion from Bug with Killstreak System: Bug with Kill System (related to Bug with Killstreak System)
You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Fixing the Kill System
-
What is the issue? Bug persists where players can’t gain kills
-
What solutions have you tried so far? Adding a task.wait() to the beginning of my script
Extra: This occurs mainly within the players/dummies, not a separate script in ServerScriptService or Workspace. This is from the same script as “Bug with Killstreak System” because I couldn’t fix the kill gains either.
The code of my Kill system (same from Killstreak system, minus the kill messages, ragdoll, and death sounds):
local char = script.Parent
local player = game.Players:GetPlayerFromCharacter(char)
char.Humanoid.BreakJointsOnDeath = false
task.wait()
char:FindFirstChildWhichIsA('Humanoid').Died:Connect(function()
local charWhoTagged = game.Workspace:FindFirstChild(char.Stats.TaggedByName.Value)
if charWhoTagged then
if game.Players:GetPlayerFromCharacter(charWhoTagged) then
local playerWhoTagged = game.Players:GetPlayerFromCharacter(charWhoTagged)
playerWhoTagged.leaderstats.Eliminations.Value += 1
if charWhoTagged.Stats.KillStreak.Value == 10 then
game.BadgeService:AwardBadge(playerWhoTagged.UserId, 1483874774032918)
end
if charWhoTagged.Stats.KillStreak.Value == 50 then
game.BadgeService:AwardBadge(playerWhoTagged.UserId, 15164141694387)
end
end
end
end)