So I'm currently making a game where you can pick up orbs to gain Defense. Then, that defense is then converted via script to health, and 1 Defense = 1 Health. I'm currently using remote events but I still can't put my finger on it, any ideas? Currently, I'm stuck on converted defense to health via a script, because the defense is a client value, while health is a server value. I think remote events would work, but then I still don't know how the events would work. Help!
My Current 2 scripts: Local (fire client)
local defense = game.Players.LocalPlayer.leaderstats.Defense
local Event = game.ReplicatedStorage.HealthMultiplier
if defense.Value >= 0 then
Event:FireServer()
end
I think I need to combined the two values together in one script, but thats not possible without remote events, then again after remote events I don't know how I would do it.
Script (recives client)
local defense = game.Players.LocalPlayer.leaderstats.Defense
local Event = game.ReplicatedStorage.HealthMultiplier
local Health = script.Parent.Humanoid.Health
Event.OnServerEvent:Connect(function()
Health.Value = Health.Value + defense.Value*1
end)
I know this doesn't work because I'm using something local, but If I do a local script then I have to do something through a normal script, this confused work constantly repeats. I know its really confusing and you probably have no idea what I'm talking about. I've tried looking on youtube, discord servers, etc. But found nothing. Help would be appreciated!

2 comments
No errors, however it does not convert the players defense stat to extra health.
Oh! if you want extra health, replace line three of the server script with: player.Character.Humanoid.Health = player.Character.Humanoid.Health + num * m