Log in to vote

How do you tween a text button when a button is clicked?

Asked by 1 year ago

I would like the text button and a frame to stay on the scene until the button is clicked then I would like to have the button tweened off the scene. Like a play button to a new game.

(Im very new to Lua coding)

This is the code I have:

local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

local button = playerGui.PlayScrene.Screne.Play
local PlayButton = playerGui.PlayScrene.Screne.Play
local object =playerGui.PlayScrene.Screne
local click = game.Workspace.Click

object.Position =, -object.Size.X.Offset, 2, 0)

    object:TweenPosition(, 0,0.35, 0))

I realize that some stuff may be misspelled


1 answer

Log in to vote
Answered by 1 year ago

when writing the...

object:TweenPosition(, 0,0.35, 0))

you forgot the numbers at the end, So it would look like this

object:TweenPosition(, 0,0.35, 0),1,1,1,1)

Answer this question