local Humanoid = require(game.ReplicatedStorage.Compiler.Humanoid)
local Health = require(game.ReplicatedStorage.Compiler.Humanoid.HealthModule)
local DeathHP = 5
game.Players.PlayerAdded:Connect(function(player)
local Folder = Instance.new("Folder")
Folder.Parent = player
Folder.Name = "CustomHumanoid"
local Objects = game.ReplicatedStorage.Compiler.Objects:GetChildren()
for _,v in pairs(Objects) do
v:Clone().Parent = Folder
end
wait(3)
Humanoid:SetHealthOnJoin(player) -- module function
Folder:FindFirstChild("Health"):GetPropertyChangedSignal("Value"):Connect(function(property)
print("property changed")
if property <= DeathHP then
print('Death initiated')
local Messages = {
-- death messages
}
Health:OnDeath(player,Messages) -- other module function
end
end)
end)
Why does GetPropertyChangedSignal give up on me whenever I change the health value to under 5 (DeathHP), no prints or anything
Health is an IntValue that I inserted via the for loop so I don't get what's happening here.
