this script inside tp block
local part = script.Parent local table = [game.Workspace.NPC1:MoveTo(Vector3.new(-243.135, 7.085, -200.469)); game.Workspace.NPC2:MoveTo(Vector3.new(-243.135, 7.085, -200.469));] local function onPartTouched(otherPart) local partParent = otherPart.Parent local humanoid = partParent:FindFirstChildWhichIsA("Humanoid") if humanoid then math.random(table) end end part.Touched:Connect(onPartTouched)
idk how to make table so, could you please script one for me?
Okay, so you don't actually need a table for this, I see what you're trying to do so here's my attempt to help you
local part = script.Parent local position = Vector3.new(-243.135, 7.085, -200.469) part.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local RandomNum = math.random(1,2) game.Workspace:FindFirstChild("NPC"..RandomNum).Humanoid:MoveTo(position) end end)
not entirely sure if this works, but i tried