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

How to teleport all of the same npcs to me?

Asked by 4 years ago

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

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) kujekmarek 24 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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)

0
how do i make a table with every npc bokunorobloxaccnt 2 — 4y
0
local NameOfYourTable = {every npc here or just make a folder with NPC'S and do 'Name of folder with npc:GetChildren()) kujekmarek 24 — 4y
Ad

Answer this question