I'm trying to make a menu that if you press the play button, The frame will tween from Transparent to Opaque and into Transparent. Someone help me please, Thank you.
COMMUNITY QUESTION
Can someone tell me on how to Tween a Transparency of a GUI after a GUI button is pressed?
1 answer
My script is this:
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
local PlayButton = script.Parent.Container.PlayButton
repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.CameraPart.CFrame
PlayButton.MouseButton1Click:Connect (function()
Camera.CameraType = Enum.CameraType.Custom
PlayButton.Parent:Destroy()
end)
Any idea on where to put it?
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
i assume you want it when playbutton is clicked so you can put the code after camera.cameratype in the playbutton.mousebutton1click function, and then put a wait after the tween for how long you put it before destroying the parent