Hey Does anyone know how to make a gui invisible after playing a tween Im dumb..

My current Script

    local TweenService = game:GetService("TweenService")
     
    local frame = script.Parent
    frame.AnchorPoint = Vector2.new(0.5, 0.5)
    frame.Position = UDim2.new(0, 70, 0, 70)
    frame.BorderSizePixel = 0
    frame.Size = UDim2.new(0, 100, 0, 100)
    frame.BackgroundColor3 = Color3.new(0, 0, 0)
     
    -- Set up tweens
    local tweenInfo1 = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
    local tween1 = TweenService:Create(frame, tweenInfo1, {Position=UDim2.new(0.5, 0, 0.5, 0)})
    local tweenInfo2 = TweenInfo.new(1.5, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut)
    local tween2 = TweenService:Create(frame, tweenInfo2, {Rotation=180})
     
    tween1.Completed:Connect(function()
    	tween2:Play()
    end)
     
    wait(2)
     
    tween1:Play()


 

3 comments

0

Basically just do frame.Visible =

0

frame.Visible = false

0

thanks sorry for late reply