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

Zombie script not working?

Asked by 9 years ago

Here is the code [This code is in a REGULAR script.]

local Humanoid = script.Parent.Zombie --Zombie is the name of the humanoid
local Message = Instance.new("Message")
function PwntX_X() --when the boss dies then...
Message.Text = "The boss has been defeated by"..creator --I'm guessing creator means the player that killed the boss? And then the message says the boss has been defeated by playername.
Message.Parent = game.Workspace
wait(5)
Message:Remove() --after 5 sec the message removes
end 
Humanoid.Died:connect(PwntX_X) --when the boss dies

I'm not that good with working will humanoids and zombies that well. I explained what im doing throughout the script. This script is inside a model called 'Chicken Boss' Thanks!

1 answer

Log in to vote
0
Answered by
RedCombee 585 Moderation Voter
9 years ago

The script would work but you just have to give the message a parent. Try this:

local Message = Instance.new("Message",Workspace)

You also need to define "creator" in your script. The variable "creator" is currently empty, so you have to give it a value.

0
how would i give it a value PyccknnXakep 1225 — 9y
0
well, i figured out how to give it a value but it still didnt work. PyccknnXakep 1225 — 9y
Ad

Answer this question