Videos aren't working

I have them in a surface GUI, enabled, playing, looped, everything is set.

I hit run, and it’s just a still image. And when I stop running the game, it just disappears entirely.

What’s going on? I wanted to make a TV for a map, but videos refuse to work.

What’s causing this?

You can only upload and view one of the preset videos from the video section of the toolbox… is this what you have done?

1 Like

Yes.

Also sorry for the late reply!

No problem… have you tried using the code provided in the reference:

https://create.roblox.com/docs/reference/engine/classes/VideoFrame

No, I haven’t.

I can’t understand much of the code, but would I need to modify anything to use it on an existing part? There’s an instance.new for a part in it. Will anything need to be modified?

Also, late reply again, sorry lol.

The existing code doesnt normally need to be modified, it creates instances for the part, the surface gui, and the video frames… if you want it to work on your part just replace the first instance with your part like this (it will then create instances of the surface gui and video in your part):

local screenPart = -- reference your part here

local surfaceGui = Instance.new("SurfaceGui")
surfaceGui.Parent = screenPart

local videoFrame = Instance.new("VideoFrame")
videoFrame.Parent = surfaceGui

videoFrame.Looped = true
videoFrame.Video = "rbxassetid://" -- add an asset ID to this

while not videoFrame.IsLoaded do
	task.wait()
end

videoFrame:Play()
3 Likes