Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Kill counter in knife ?

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

✓ Accepted answer

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)

1 comment

0

thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.