It's really my first time doing scripting and I am really curious on how to make a teleportation script.
01 | local part = script.Parent |
02 |
03 | part.Touched:Connect( function (player) |
04 | if player.Parent:FindFirstChild( "HumanoidRootPart" ) then |
05 | local hum = player.Parent:FindFirstChild( "HumanoidRootPart" ) |
06 | if hum then |
07 | wait( 0.25 ) |
08 | hum.CFrame = part.Parent.B.CFrame*CFrame.new( 0 , 2 , 0 |
09 | wait( 2 ) |
10 | end |
11 | end |
12 | end ) |
Here's a script where you touch a part then teleport on top of the second part. The thing to remember is that when moving a player always use "HumanoidRootPart" so that the whole humanoid of the player will be teleported.