Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how do i change a clones value?

I am making a NPC and I want so that when the NPC is killed it will clone the NPC will turn the Clone's humanoid health to 100 again

 local original = script.Parent
    local copy = original:Clone()
    copy.Parent = original.Parent
    copy:SetPrimaryPartCFrame(CFrame.new(242.074, 14.69, 403.489))

Thank you if you help

1 answer

✓ Accepted answer

You can listen for the Died event in Humanoid, and then set copy.Humanoid.Health = 100. When cloning the NPC, make sure to Parent it to Workspace and call model:MakeJoints()

3 comments

0

Is there another way it is not working I didn't use the died event

0

No

0

See the updated answer though

This discussion is preserved as it was. New answers, comments, and votes are closed.