I made a quest system that whenever you kill an enemy, 1 is added to your kills for the quest. However, it doesn’t add anything. No errors at all. Please help me!
Script:
for _, enemy in pairs(workspace.Enemies:GetChildren()) do
enemy.Humanoid.Died:Connect(function()
if enemy.Humanoid:FindFirstChild('creator') then
print('yes1') -- prints
local player = enemy.Humanoid.creator
if enemy:FindFirstChild('QuestValue') then
print('yes2') -- prints
if enemy.QuestValue.Value == player then
print('yes3') -- doesn't print?
player.QuestProgress.Value += 1
end
end
end
end)
end
There are quest values + creator tags in the enemy’s humanoid:
And there is a number value called QuestProgress in the player. Please help me