I have no clue what this error is, I have never seen it before in my honest life.
I am creating a respawn script for an npc, and here is what I have so far!
local char = script.Parent
local head = char.Head
local lleg = char["Left Leg"]
local rleg = char["Right Leg"]
local larm = char["Left Arm"]
local rarm = char["Right Arm"]
local torso = char.Torso
local humanoid = char.Humanoid
local name = script.Parent.Name
local clight = game.Lighting:FindFirstChild(name)
local isready = false
humanoid.Changed:connect(function(property)
local fvalue = humanoid[property]
local value = tonumber(fvalue)
if property == "Health" then
print("health changed")
if value == 0 or value < 0 then
isready = true
wait(5)
elseif value > 0 then
isready = false
end
if isready == true then
isready = false
print("time to respawn")
local clone = clight:clone()
clone.Parent = game.Workspace
clone.Name = name
clone.Script.Disabled = false
script.Parent:Remove()
end
end
end)
The error that comes up is at Line 14, The error:
23:12:53.444 - Unable to query property Health_XML. It is not scriptable 23:12:53.446 - Script 'Workspace.urmom.Script', Line 14 23:12:53.448 - Stack End
Does anyone have a clue as to why this happens?
