Advertisement
4zx16

Teleport by CFrame (On Touch) (Whitelisted) (Model)

Nov 21st, 2021 (edited)
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.77 KB | None | 0 0
  1. --[[
  2.  || 📜 AUTHOR: @4zx16 || TELEPORT BY C FRAME (WHITELISTED) || CHANGE CFRAME.NEW TO THE PART YOU WANNA TELEPORT TO.
  3. ]]
  4. local Whitelist = {}
  5. -- Whitelist for people u want to be teleported to a specific location
  6.  
  7. for i,v in ipairs(Whitelist) do
  8.     local part = script.Parent.Parent.Hatch
  9.     for i,parts in pairs(part:GetChildren()) do
  10.         parts.Touched:Connect(function(hit)
  11.             if hit.Parent and game.Players:FindFirstChild(hit.Parent.Name) then
  12.                 local player = game.Players[hit.Parent.Name]
  13.                 player:FindFirstChild("Humanoid")
  14.                 if player.Name ~= v then
  15.                     player:Kick("Sorry, this is a Developer Area only!")
  16.                 end
  17.                 if player.Name == v then
  18.                     player.Character.HumanoidRootPart.CFrame = CFrame.new(-43.89, 0.5, -33.96)
  19.                 end
  20.             end
  21.         end)
  22.     end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement