As i said in the title GetPropertyChangedSignal(“Value”) does not always detect health value, health sometimes going - values (no error on console) how do i fix that ?
Could you show us the parent of the script? So we could have a bit of reference.
Are you sure that is not detecting it? Assuming you are removing life from the client and that is a server script I don’t think it will detect that
script is works fine but sometimes just doesnt detect and yes script is serverscript
If you don’t detect it, are you sure it really took healt?
Could you try to put a print inside the block so you can make sure if when you take away the life the event is activated or not? I can also assume that maybe the Destroying variable is true.
Try to put also a print of “Destroying”
From what I see, you never set back Destroying
to false, thus the first statement would stop after the first time
destroying is still true after health is 0 but script worked fine
Then You find the problem read the condition that you put
Just put back the Destroying Var to false
i tried that but doesnt work but i figure out the problem , the problem is if the person attacking the part and closes the game while attacking health is going - values , how i can i fix that ?
is the value going to negative?
I didn’t understand what you mean in the last part of the sentence
yes, value is going to negative if player closes the game while attacking the brick and no one can click the brick after that
Try inserting this in you’re script
function PutBacktoZero()
-- // Put Back the Value to 0
ConnectionPlayerLeave:Disconnect()
end
local ConnectionPlayerLeave = game.Players.PlayerRemoving:Connect(function()
PutBacktoZero()
end)
that works but changes other parts too
What do you mean with this just change the specify value back to 0
when 2 players attack different parts and one of the lefts the game the other part value is getting 0 too