Please note that my game is Filtered Enabled and there is a remote event I'm using to apply changes.
P.S. There are no errors in output either.
--//LOCALSCRIPT
--//Variables
local plr = game.Players.LocalPlayer
local chr = plr.Character
local hum = chr.Humanoid
local bar = script.Parent.Parent
local hbar = script.Parent
local htxt = script.Parent.TextLabel
repeat wait() until plr.chr
local healthMath = hum.Health / (hum.MaxHealth)
local replicatedStorage = game:GetService("ReplicatedStorage")
local healthEvent = replicatedStorage.healthEvent
--//Booleans
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
--//Scripting
plr.hum.HealthChanged:Connect(function(health)
healthEvent:FireServer()
end)
--//SCRIPT
--// Variables
local replicatedStorage = game:GetService("ReplicatedStorage")
local healthEvent = replicatedStorage.healthEvent
--// Scripting
local function onHealthChanged(player)
local hum = player.Character:WaitForChild("Humanoid")
local healthMath = hum.Health / (hum.MaxHealth)
local hBar = player.PlayerGui.healthAssets.healthBar
hBar:TweenSize(UDim.new(healthMath, 0, 1, 0), "Out", "Sine", .2)
end
There are no errors in output either.

1 comment
Server scripts can't handle client-sided stuff sadly. :/ You gotta use a
LocalScriptfor that.