Client(s) Humanoid.Health to Server's Humanoid.Health

Hello, I’m in the process in working on a healing script for my game. The current process of how it works goes as follows,
ClickDetector->Script to activate a GUI to fight the mob, the move sets contain a local script to deal damage. (This is where I know the problem persists) then back in the ClickDetector script is what happens when you win/lose. Now since the damage part for the player is located in a local script I know that this isn’t indexing to the server. I wasn’t sure how I’d set up a script inside the ClickDetector script that using the local humanoid health to then take damage to the server humanoid. Here’s the part of the script that has where I want the damage part to happen, inside the ClickDetector script,

script.Parent.MouseClick:Connect(function(player)
	local ph = player.Character.Humanoid
    local hum = -- Mob Humanoid
	hum.Died:Connect(function()
		-- Where I want this to happen
	end)
end)

Note that I took out most of it as it’s mostly variables to go with the mob, anything to do with player health is in the script.
Any help is appreciated, thanks in advanced,
-Notrealac0unt

Local scripts will not execute unless parented to

  • A Player’s Backpack , such as a child of a Tool
  • A Player’s character model
  • A Player’s PlayerGui
  • A Player’s PlayerScripts .
  • The ReplicatedFirst service

(from the wiki)

Therefore, if you have a local script parented to a part, it won’t execute.

The humanoid:TakeDamage function will affect the server, even if in a client script (but only for the local player, no others).