#TweenService

1 messages · Page 1 of 1 (latest)

cursive steppe
#

Hello! Im new to scripting and I have a button that opens up a frame. When I click it there is no animation, it just shows up. I know I have to use TweenService to do it but I dont know how to use it. Any help would be appreciated. Script:

#
local player = game.Players.LocalPlayer
local button = player.PlayerGui.SmallWeatherStation.Button
local sws = button.Parent.SWS

button.ImageButton.MouseButton1Click:Connect(function()
    if sws.Visible == true then
        sws.Visible = false
    else
        sws.Visible = true
    end
end)

#

SWS = is the frame

#

button is a frame, inside the frame is the actual button = imagebutton

#

I want it to go from offscreen, to be in position ( the animation)

cursive steppe
visual anvil
cursive steppe
#

I guess how to set up the tween, Udim...

visual anvil
cursive steppe
#

So im confused, what is tweeninfo used for?

visual anvil
cursive steppe
#

Oh okay, also can I make it so that

button.MouseButton1Click:Connect(function()
tween:play()
end)
#

and ill also set up tween to have the animation stored

visual anvil