Are we able to script videos

I wanna figure out some way to change videos via a script, not exactly sure how I’d be able to do it but I feel like it’d be some sort of script that would grab the link for the video and display it?

Any feedback or suggestions would be greatly appreciated because I’m trying to create a working movie theater

3 Likes

I think you could use a template for changing music on a playlist or a radio system, just replace some of the classes with VideoFrame. I’d assume video frame works similar to how audio works in script

2 Likes

Exactly, that’s what I kinda thought too. I’ll try it out and see if it works; it probably should

1 Like

I’m wording that two. I am trying to make one where a user inputs a number value (ID) and the video changes to that ID.

someone kind of helped me on this form but it didn’t work for me. it might work for you.

1 Like

Thank you! I’ll try to see what I can do with that!

Update. Finally was able to try this out to see if it works. Haven’t tested it out, but wanted feedback from you.

This is what I came up with

VideoFrame1 = “5608250999”

VideoFrame2 = “5608400507”

VideoFrame3 = “5608368298”

VideoFrame4 = “5608321996”


local VideoFrame1 = game.Workspace.5608250999.VideoFrame1

local VideoFrame2 = game.Workspace.5608400507.VideoFrame2

local VideoFrame3 = game.Workspace.5608368298.VideoFrame3

local VideoFrame4 = game.Workspace.5608321996.VideoFrame4

while true do

VideoFrame1:Play()

VideoFrame1.Ended:Wait()

wait(2)

VideoFrame2:Play()

VideoFrame2.Ended:Wait()

wait(2)

VideoFrame3:Play()

VideoFrame3:Ended:Wait()

wait(2)

VideoFrame4:Play()

VideoFrame4:Ended:Wait()

wait(2)

end

Would this work? I feel as if I’m missing something but I’m not too sure

I personally use a selection for my theater, you can watch this to see what I mean.

https://i.gyazo.com/08a4854932b870e83a0baa0c17cce7c4.mp4

1 Like

Each button has a string value inside of it which is the asset id, and when clicked it fires a remote event and changes it. I am probably gonna be switching over to a textbox feature instead of a selection soon.

1 Like

Dude that looks awesome! That’s advanced, I like it. Do you think there’d be a way to just loop the same 3-4 movies over and over? If so, any suggestions?

1 Like

Yeah, lemme write up an example rq for ya.

There you go, it should work.

local Movies = game.Workspace.Movies
local Video = game.Workspace.Part.SurfaceGui.VideoFrame

for i, v in pairs(Movies:GetChildren()) do

if v:IsA("StringValue") then

Video.Video = v.Value

Video.Ended:Wait()

end

end

It should work provided you set it all up correctly, please ask if you have questions.

1 Like

XD np man, does it work btw, I didn’t test it.'=

I’ll give it a try when I’m able to

Bit late, but my movie theater uses similar scripts to what you provided. You can use :Play(), .Ended, etc.