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

Kill counter in knife ?

Asked by 6 years ago

So i need some help (sorry if i had a bad english) i have a script that count the kill are count from a folder... let me explain : i scripted a knife and when it touch a player it change the parent of the player's humaoid to the storage (the storage is a folder inside the knife) and it have a gui too but i want a script that count how many humanoid there is in folder ... for an example if there is 3 humanoid in the folder it will set a value to 3 and when this value is 3 it show it on the gui

I hope you understand thanks.

1 answer

Log in to vote
0
Answered by 6 years ago

Just do a local script inside the Tool:

script.Parent.KillFolder.Changed:connect(function()
    local array = script.Parent.KillFolder:GetChildren()
    local amount = #array
    if amount == 3 then
        --Do whatever you need
    end
end)
0
thanks xJathur95x 129 — 6y
Ad

Answer this question