Rrrrry123

How to make a Teleportation GUI

Mar 31st, 2019
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. -- Both have errors, make sure you watch the full video for the fixes!
  2.  
  3. --ScriptService
  4. game.ReplicatedStorage.Teleport.OnServerEvent:Connect(function(player, location)
  5.     player.Character.HumanoidRootPart.Position = game.Workspace.TeleportLocations:FindFirstChild(location)
  6. end)
  7.  
  8. --Local Script
  9. for i,v in pairs(script.Parent.Frame:GetChildren()) do
  10.     if v:IsA("TextLabel") then
  11.         v.MouseButton1Click:Connect(function(player)
  12.             game.ReplicatedStorage.Teleport:FireServer(v.Name)
  13.         end)
  14.     end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment