Increasing players health is not changing

Trying to make a move, in which it increases your hp. I thought i was doing it right but it just doesn’t want to work. I’ve looked around on google and asked in a server and haven’t found nothing or no one knew the problem.

(Local Script)

local UIS = game:GetService("UserInputService")
local event = game.ReplicatedStorage.Rimuru:WaitForChild("Regen")

local debounce = false
local cooldown = 0.1

UIS.InputBegan:Connect(function(input,gp)
	if gp then return end
	if input.KeyCode == Enum.KeyCode.One then
		if not debounce then
			debounce = true
		event:FireServer()
		end
	end
	wait(cooldown)
	debounce = false
end)

(Server Script)

local RS = game:GetService("ReplicatedStorage")
local event = RS.Rimuru:WaitForChild("Regen")

event.OnServerEvent:Connect(function(plr)
	local character = plr.Character or plr.CharacterAdded:Wait()
	local humanoid = character:WaitForChild("Humanoid")
	
	if humanoid then
		humanoid.Health += 15
		print("DONE")
	end

end)

It prints everything and im making sure health is low but it does nothing at all. Im spending too much stress and time over this.

I have tested everything is work fine are you sure you set humanoid health to low health on server? (and i don’t know if you have solution to this already)

1 Like

Make sure that you damage the character from the server to check if it works.

You can manually do that by going to Test > Current: Client.
image

Now your at the server.
image

And then from explorer, you can go the humanoid and change the health properties.

1 Like

Thank you. This worked. @RandomPlayerOne1 thank you as well

1 Like