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

How do you properly Make Teleporter pads? [closed]

Asked by 8 years ago

Please someone help me out here.

Closed as Not Constructive by evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 8 years ago

If you want to make one part teleport you somewhere, you could use this method:

function teleport(hit)
    local torso = hit.Parent:FindFirstChild("Torso") --finds torso
        if torso then --continue script if torso exists
            torso.CFrame = CFrame.new(Vector3.new(0, 10, 0)) --change this to the correct co-ords
        else
            print("No Torso")
    end
end 

script.Parent.Touched:connect(teleport) --connect event to function teleport

but if you wanted to make the brick teleport you to another brick you could do this:

function teleport(hit)
    local torso = hit.Parent:FindFirstChild("Torso") --finds torso
        if torso then --continue script if torso exists
            torso.CFrame = --change this to the part--.CFrame
        else
            print("No Torso")
    end
end 

script.Parent.Touched:connect(teleport) --connect event to function teleport
Ad