Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

I can't change the properties of a video, help?

Asked by 3 years ago

comes up with the error: Playing is not a valid member of Part "Workspace.Tv.Video"

Script:

local Remote = script.Parent
local Tv = game.Workspace.Tv

Remote.ClickDetector.MouseClick:Connect(function()
    Tv.Video.Playing = true
end)

I understand videos in Roblox are new and all but this is something you should be able to do...

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

The Playing property is only there to check if the video is currently playing. To actually play a video you have to use Play(). The correct code for you to use would be:

local Remote = script.Parent
local Tv = game.Workspace.Tv

Remote.ClickDetector.MouseClick:Connect(function()
    Tv.Video:Play()
end)

If you found this answer helpful, I would appreciate it if you accepted it.

Edit: I noticed your path is game.Workspace.Tv which means that you're trying to play a video directly on a part. If you want this to work correctly you need to put a video inside a SurfaceGui

Ad

Answer this question