I made the script, and it doesn’t seem to work, It keeps printing “Made a killstreak value” 3 times and then just doesn’t work.
Im trying to make a kill streak system, where you have 9 seconds to get 3 kills and if you do, you get a awarded badge.
But this script isn’t working, and theirs no error.
local Players = game.Players
local countDownScript = script:WaitForChild("countDownScript")
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local character = char
local h = character:FindFirstChildOfClass("Humanoid")
local creator = Instance.new("StringValue", h)
creator.Name = "creator"
local KillStreak = Instance.new("IntValue", player)
KillStreak.Name = "killStreak"
print("Making a killstreak value")
h.Died:Connect(function()
local playerResponsible = h:WaitForChild("creator").Value
for i, v in pairs(Players:GetChildren()) do
if v.Name == playerResponsible then
local PlayersKillStreak = v:WaitForChild("killStreak")
PlayersKillStreak.Value = PlayersKillStreak.Value + 1
print("Cloned Script")
local clonedScript = countDownScript:Clone()
clonedScript.Parent = v
end
end
end)
end)
end)