local Dummy = script.Parent local Humanoid = Dummy.Humanoid local ThoseWhoDamaged = Dummy.ThoseWhoDamaged local XPReward = Dummy.XPReward Humanoid.Died:Connect(function() print("Dummy Died, giving rewards") for i, v in pairs(ThoseWhoDamaged:GetChildren()) do game.ReplicatedStorage.RewardXP:FireClient(v.Value, XPReward.Value) end end)
This function is suppose to run when the humanoid dies, however, it does not. It's in a regular script in workspace. Why is this happening?
edit:
I made some changed to the script and it's magically working now, despite the fact that I changed nothing regarding where the script was located or how the function ran. Whatever though, it works now.
edit (again)
Turns out it is unreliable. It doesn't always fire when the humanoid dies.