PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

Video

VideoFrame

Content

The content ID of the video file a VideoFrame object is associated with.


Code Samples


Creating and Playing a Video

The code sample below demonstrates how to create and play a VideoFrame with SomeValidAssetID once the video has loaded.

local screenPart = Instance.new("Part", workspace)
local surfaceGui = Instance.new("SurfaceGui", screenPart)
local videoFrame = Instance.new("VideoFrame", surfaceGui)

videoFrame.Looped = true
videoFrame.Video = "SomeValidAssetID" -- replace this with a real rbxassetid://<numbers>

while not videoFrame.IsLoaded do
	wait()
end

videoFrame:Play()