I recently asked a question about why my fire script wasn't working, and I got some help. However, I now have an issue where am not sure how to properly refer to parts of the player in the script. I am trying to make a script where when the player approaches the fire, they start burning, but now am not sure how to access their health.
local firePart = script.Parent
local Players = game:GetService("Players");
firePart.Transparency = 1
local function LightOnFire(part)
local fire = part:FindFirstChild("Fire")
if not fire then
fire= Instance.new("Fire")
fire.Parent = part
local client = Players:GetPlayerFromCharacter(part.Parent)
if (client) then
Players.
end
end
end
firePart.Touched:connect(LightOnFire)
if you want to access a player's health it would be client.Character.Humanoid.Health