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

How could I make a button that enables/disables a surface gui or enables playing for a video frame?

Asked by 1 year ago

I'm working on a showcase game and in real life there's a tv that plays along side the show. I've managed to get the video frame to work but I cannot get the frame to play with a script or enable the surface gui

0
Can u show your script theking66hayday 841 — 1y
0
Yeah I Posted As An Answer CEC_Employee 2 — 1y

2 answers

Log in to vote
0
Answered by
Lakodex 711 Moderation Voter
1 year ago
Edited 1 year ago

WE DO NOT SUPPLY SCRIPTS

You must first attempt. And if it doesn't work, post what you have tried and we'll assist you.

Rule 2, of Website guidelines. On the Community guidelines.

Edit:

Thanks for posting your code. At the current moment it it impossible to player video frames outside of the StarterGui. But don't be disappointed yet! You can actually use adornee and keep the surfacegui in StarterGui and it will be on the part correctly.

Ad
Log in to vote
0
Answered by 1 year ago

These are previous tried scripts: 1. --function OnClicked() --if game.workspace.WALL1.TV.SurfaceGui.VideoFrame.Playing == false then -- game.workspace.WALL1.TV.SurfaceGui.VideoFrame:Play() --else -- game.workspace.WALL1.TV.SurfaceGui.VideoFrame:Stop() --end --end

2. --game.workspace.WALL1.TV.SurfaceGui.VideoFrame.Playing = true --wait (185) --game.workspace.WALL1.TV.SurfaceGui.VideoFrame.Playing = false --end

3. -- print("Hello world!") --local Character = game.Workspace.WALL1.TV.SurfaceGui --local ison = false --function switch() --if (ison == false) then --ison = true
-- Character.VideoFrame.Playing = true

--game.workspace.WALL1.TV.SurfaceGui.Enabled = true
--wait (185)
--game.workspace.WALL1.TV.SurfaceGui.Enabled = false

--end

4. --Button = script.Parent --local TVScreen = game.Workspace.WALL1.TV:FindFirstChild("Hitbox").TVScreen

--script.Parent.MouseButton1Click:Connect(function()

--if TVScreen.Enabled == true then
--  TVScreen.Enabled = false

-- elseif TVScreen.Enabled == false then --TVScreen.Enabled = true -- end --end)

5. --button = script.Parent --TVScreen = game.Workspace.WALL1.TV.TVScreen

--script.Parent.MouseButton1Click:connect(function() --- if button.TVScreen.Enabled == false then -- button.TVScreen.Enabled = true -- else -- button.TVScreen.Enabled = false -- end --end)

6. --local VideoScreen = workspace.WALL1.TV.TVScreen -- Put location of your script you want to enable/disable --function onButtonClicked() -- VideoScreen.Disabled = false -- end -- script.Parent.MouseButton1Down:connect(onButtonClicked)

0
The spacing is a bit messed up but it looks normal in the script CEC_Employee 2 — 1y

Answer this question