Please someone help me out here.
If you want to make one part teleport you somewhere, you could use this method:
01 | function teleport(hit) |
02 | local torso = hit.Parent:FindFirstChild( "Torso" ) --finds torso |
03 | if torso then --continue script if torso exists |
04 | torso.CFrame = CFrame.new(Vector 3. new( 0 , 10 , 0 )) --change this to the correct co-ords |
05 | else |
06 | print ( "No Torso" ) |
07 | end |
08 | end |
09 |
10 | 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:
01 | function teleport(hit) |
02 | local torso = hit.Parent:FindFirstChild( "Torso" ) --finds torso |
03 | if torso then --continue script if torso exists |
04 | torso.CFrame = --change this to the part--.CFrame |
05 | else |
06 | print ( "No Torso" ) |
07 | end |
08 | end |
09 |
10 | script.Parent.Touched:connect(teleport) --connect event to function teleport |
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?