Viewport frame tutorial

How to use viewport frame

by awosoneplayer123_90

Author Avatar

Before starting the tutorial.im sorry for bad quality images

What is a viewport frame

Viewport frame are like imagelabel 2.0

What they dont need

  1. Image
    
  2. File
    

What they need

  1. A camera
    
  2. A part or mesh or union
    

How to make one

First insert a ScreenGui in StarterGui

img|95x80

Also insert a viewport frame inside

img|90x85

Then customize it

After insert a LocalScript in the ViewportFrame and type the following code

local viewportFrame = script.Parent

local camera = Instance.new("Camera",viewportFrame)
viewportFrame.CurrentCamera = camera

local part = Instance.new("Part",viewportFrame)
part.BrickColor = BrickColor.new(0,0,230)
part.Position = Vector3.new(0,0,0)

camera.CFrame = CFrame.new(Vector3.new(0,3,12),part.Position)    --if you are not famillar with CFrames please read the article Understand CFrame on devforum

Results:

img|320x200

The End

Thanks you for reading i hope you enjoy Have a good day :D

View in-game to comment, award, and more!