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

Why does me teleporter script not do anything, yet it gives no error messages?

Asked by
Jexpler 63
5 years ago

I have a teleporter script.

local r1 = script.Parent.Parent.ElevatorTopRegion.Reg1
local r2 = script.Parent.Parent.ElevatorTopRegion.Reg2
local r1p = r1.Position
local r2p = r2.Position

local region = Region3.new(Vector3.new(r1p.X,r1p.Y,r1p.Z), Vector3.new(r2p.X,r2p.Y,r2p.Z))

script.Parent.ClickDetector.MouseClick:Connect(function()
    local gete = game.Workspace:FindPartsInRegion3(region, nil, 1000)
    for i,v in pairs(gete) do
        print(v.Name)
        if v.Parent:FindFirstChild('Humanoid') then
            v.Parent.HumanoidRootPart.CFrame = CFrame.new(138.242, 128.559, 4.099)
        end
    end
end)

Nothing happens. It doesn't even print anything.

0
Do print(unpack(gete)) and make sure it's not just an empty table. SummerEquinox 643 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Is the script disabled? if not then add a wait() to the for loop

Ad

Answer this question