whenever it dies it doesnt destroy it self or subtract from value
local mobnumb = game.ServerScriptService.DeathCheck.mobnumber local hum = script.Parent hum.Died:Connect(function() mobnumb.Value -= 1 hum.Parent:Destroy() end)
Hello! I've examined your script, and I am here to help.
I've found an issue on line 6
mobnumb.Value -= 1
That line of code is wrong, the correct code would be:
mobnumb.Value = (mobnumb.Value-1)
I'm not sure why you're trying to delete the player's character model but that should work If the value error gets fixed.
Make sure the script is not a LocalScript or It won't work as you're trying to set a value that's located in ServerScriptService meaning It has to be server-sided.