Hello, I'm Making A Simulator Game And I'm Making This Script But The NPC Keeps Coming out Cause I Need To Put It On Cancollide Off So Can Anyone make 10 Model named "Zombie" And The Zombies Can't Come Out Thanks!
local Players = game:GetService("Players")
local sword = game.ReplicatedFirst.ClassicSword
local debounce = false
local part = script.Parent
local function onTouched(part)
if not debounce then
debounce = true
local player = Players:GetPlayerFromCharacter(part.Parent)
if not player then return end
local backpack = player.Backpack
sword:Clone().Parent = backpack
delay(5, function()
debounce = false
end)
end
end
part.Touched:Connect(onTouched)

1 comment
Please stop asking people here to make scripts for you.