Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make NPC talk when theyre dead?

Asked by 5 years ago
Edited 5 years ago

I found this script, i current killed the NPC, and it seem it didnt say what it was program to say as "Stop breaking the rules" The bottom is the script.. the error was "Chat is not a valid member of Model"

while true do
wait(0.1)
if script.Parent.Humanoid.Health < 100 then
script.Parent.Chat.Disabled = true
game:GetService("Chat"):Chat(script.Parent.Head, "Stop breaking the rules!", Enum.ChatColor.Red)
wait(2)
script.Parent.Humanoid.Health = 100
script.Parent.Chat.Disabled = false
end
end

0
Please edit your question and use the "Lua" button in the buttons! saSlol2436 716 — 5y

Answer this question