Player controlled Zombies with Abilities

I want to make a PVP Zombie game where players play as survivors and zombies in a round based system, I want the zombies to have special abilities such as the ones from Left 4 Dead games

I don’t know how, I have an understanding of scripting and I’ve made a few things in the past but I am just asking for someone to point me in the right direction for doing these player controlled zombies

I’ve scoured everywhere for this discussion but I cannot find it anywhere

Apologies if this isn’t the place for this, not sure where else to ask

1 Like

Make the zombie (make sure it has a humanoid and all body parts are named correctly), then put it in server storage. Once a player dies, you morph them. (Put the script in ServerScriptService)

The morph script:

local Model = game:GetService("ServerStorage").MorphSaves.MorphNameHere
local Morph = Model:Clone()
		Morph.Parent = workspace
		Morph:MoveTo(player.Character.Torso.Position)
		Morph.Name = player.Name
		player.Character = Morph

Then, make a remote event. You will have it fire whenever a player is killed, cant tell you exactly how to do that since I haven’t seen it though.

Put this in the attack script:

game:GetService("ReplicatedStorage").(put event name here):FireServer(PutKilledPlayerHere)

Now, back to our morph script, we modify it slightly:

game:GetService("ReplicatedStorage").(put event name here).OnServerEvent:Connect(function(plr, player)
	player.CharacterAdded:Wait()

	local Model = game:GetService("ServerStorage").MorphSaves.MorphNameHere
	local Morph = Model:Clone()

	Morph.Parent = workspace
	Morph:MoveTo(player.Character.Torso.Position)
	Morph.Name = player.Name
	player.Character = Morph
end)

That’s it for the morphing part. Now on to the abilities.

I wont make the abilities for you, but I will tell you how to add them. Make a script in ServerScriptService once again. You will have to make the leaderstats folder first.

game.Players.PlayerAdded:Connect(function(plr)
	local ls = Instance.new("Folder")	
	ls.Parent = plr
	ls.Name = "leaderstats"
end)

Now, make a bool. (in the same player added function, ofc)

	local isZombified = Instance.new("BoolValue")	
	isZombified.Parent = ls
	isZombified.Name = "isZombified"
	isZombified.Value = false

Finally, make a GUI with your abilities. Get that sorted out BEFORE you do this. Make it visible if the bool is true. Put this script in starterGui, parent it to your screenGui with the ability UI.

game.Players.LocalPlayer.leaderstats.isZombified.Changed:Connect(function(newv)
	if newv == true then
		print("player became zombie")
		(yourGUI).Visible = true
	else
		(yourGUI).Visible = false
		print("player is human again")
	end
end)

Alright, I think that’s it for that, too. You welcome!

[Edit: Sorry, it took a while to type this out]

I’ll try this tomorrow when I have the time, thanks for the quick response!

Forgot to mention a few things in my post but I can most likely get that sorted by myself.

1 Like