Advertisement
EmanueleBM

MiniMapa

Mar 23rd, 2019
5,555
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. --Tener en cuenta los nombres como "Jugador o Mundo", que tengan las letras correctas en mayúsculas o minúsculas
  2. local viewPort = script.Parent:WaitForChild("ViewportFrame")
  3. local charPart = viewPort:WaitForChild("Jugador")
  4.  
  5. local buildings = workspace:WaitForChild("Mundo")
  6.  
  7. buildings:Clone().Parent = viewPort
  8.  
  9. local camera = Instance.new("Camera", workspace)
  10. camera.CameraType = "Scriptable"
  11.  
  12. local height = 300
  13. local player = game.Players.LocalPlayer
  14. player.CharacterAdded:Wait()
  15.  
  16. viewPort.CurrentCamera = camera
  17.  
  18. game:GetService("RunService").RenderStepped:Connect(function ()
  19. local position = player.Character.HumanoidRootPart.Position
  20. camera.CFrame = CFrame.new(Vector3.new(position.X,height,position.Z), position)
  21. charPart.CFrame = player.Character.HumanoidRootPart.CFrame
  22. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement