is there a way to make a damage detection script for the player?
if there is please tell me how, or what to use to make it.
is there a way to make a damage detection script for the player?
if there is please tell me how, or what to use to make it.
You can take a look at this post https://developer.roblox.com/en-us/api-reference/event/Humanoid/HealthChanged to understand it better, hopefully your game comes out well.
You can use the HealthChanged
function of the Humanoid and compare the humanoid’s last health with their new health, and see if the last health is greater than the new health to say that the player has taken damage
Yes, but I would use a Server Sided script. This mainly to prevent exploiters from being able to change their health while they should be dead and stuff.
I’d recommend using Humanoid.HealthChanged
More info can be found here
…You can’t use localplayer in a serverscript
If this helped, and your problem is solved, please mark this as solution!