I have a health Gui That I am trying to convert to work with filtering Enabled. I know I'm doing something wrong but cannot seem to figure out what it is due to the fact that i not getting an error on the server or in studio.
I know this is y second question today but I am still learning and eager to finish the game im making so any help would be appreciated. Thank you
Server Script
local Event = game:GetService("ReplicatedStorage"): WaitForChild("HRE")
wait(0.5)
Event.OnServerEvent:connect(function(plr)
local char = plr
local hum = char.Character.Humanoid
plr.PlayerGui.Health.Frame.Health.Frame.Size = UDim2.new(hum.Health / hum.MaxHealth, 0, 1, 0)
plr.PlayerGui.Health.Frame.Text.TextLabel.Text = math.floor(hum.Health) .. "/" .. hum.MaxHealth
if hum.Health <= hum.MaxHealth * 0.15 then
plr.PlayerGui.Health.Frame.Health.Frame.BackgroundColor3 = Color3.new(150 / 255, 0, 0)
else
plr.PlayerGui.Health.Frame.Health.Frame.BackgroundColor3 = Color3.new(0, 220 / 255, 0)
end
end)
Local Script
local ReplicatedStorage = game:GetService('ReplicatedStorage')
wait(0.5)
local char = script.Parent.Parent.Parent.Character
local hum = char.Humanoid
hum.Changed:connect(function()
ReplicatedStorage.HRE:FireServer()
end)

2 comments
Why do you need remotes to accomplish this? You could accomplish this w/o remotes. >->
he couldn't, because with filtering enabled, you NEED to use remote for almost EVERYTHING. I suggest you take a look at this: http://wiki.roblox.com/index.php?title=Security