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

How to teleport all of the same npcs to me?

Example there are 20 Zombies, 10 Skeletons how can i make a script that teleports all 20 Zombies and 10 Skeletons to me

1 comment

0

you need to make a table with all npc's and then do for i, npc in pairs(name of your table with every npc) do if npc then npc.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame + Vector3.new(0, 10, 0)

1 answer

you need to make a table with all npc's and then do for i, npc in pairs(name of your table with every npc) do if npc then npc.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame + Vector3.new(0, 10, 0)

2 comments

0

how do i make a table with every npc

0

local NameOfYourTable = {every npc here or just make a folder with NPC'S and do 'Name of folder with npc:GetChildren())

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