Advertisement
OnFireRobloxScriptin

Teleport Part

Oct 25th, 2024
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. --//Variables
  2. local teleportlocation = workspace.End --Variable for end location part
  3.  
  4. --//Teleport
  5. script.Parent.Touched:Connect(function(hit) --When part is touched
  6.     if hit and hit.Parent:FindFirstChild("Humanoid") then --Determine if a character touched it
  7.         local char = hit.Parent --Find the character that touched it
  8.         if char then --If character found
  9.             char:PivotTo(CFrame.new(teleportlocation.Position + Vector3.new(0, 10, 0))) --Teleport Player slightly above the end location part Vector3.new(0, 10, 0) will put them slightly up in the air
  10.         end
  11.     end
  12. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement