Help on a kill zombie for money script

Yes so thats the problem I dont know how to make the gun add tags. I can team create with you for you to modify the gun so that it does put tags

He is a troll and will probably complicate your system some more. Can you show the scripts in the gun and sword, mainly the ones that are responsible for dealing damage to the players/zombies?

Wait what ThoseNamesAreGood is a troll?

the scripts in the sword and especially the gun is very long so I think its better to use team create.

Hello I struggled with a problem very similar and this is what I came up with: Put this in server script service. It’s a server script

`
local function isZombie(model)
return model and model:IsA(“Model”) and model.Name == “Zombie”
end

game:GetService(‘Players’).PlayerAdded:Connect(function(player)
local function checkChild(child)
if isZombie(child) then
child:WaitForChild(“Humanoid”).Died:Connect(function()
if player.team2.which.Value == 1 then

			-- Code here (:
			end
        end)
    end
end


for _, child in pairs(workspace:GetChildren()) do
    checkChild(child)
end

workspace.ChildAdded:Connect(checkChild)

end)`

So I dont put anything in the zombie?

Also what code do I put in the “Code here” area? Do I put the code to give the player money?

1 Like

No you don’t need to (: (: 30 charr

Pasting a generic patch into your game might not solve your problem, because we have no idea how your game works. We need to see some code to understand how your weapons add Money to the players. You said that the sword works so you’d just need to modify the gun to do the same thing that the sword is doing.

Thanks I will do this and after reading the script it does make sense. But how about if a put multiple zombies? Does it still work?

I now what your trying to do but like many things in life, there is more than 1 option im gonna see what Olinator21 has and if his/hers script dosent work then I will use your way

You can either put multiple scripts and change “zombie” to the name of the other zombie or make an or statement

Ok but do you mean and/or?
How do I put and/or into lua so it understands
And where do i put it

Just do the first sugestion then if you can’t script it

Ok but Im afraid it will cause lag to players with lower-end devices.

Also, what do I put into the “Codehere:)” are of your script?
Do I put the script to give players money or something else?

Are you still on here? Or have you left?

OMG YESSSSSSS!
Thankyou so much for helping me you are the best!
:star_struck::1st_place_medal:

Mark it as the solution so people will know that you have gotten help.

1 Like

I’m sorry I’m busy I don’t have time to make new scripts for people but I’m happy to help