#TweenService
1 messages · Page 1 of 1 (latest)
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)
I saw the website, but I didnt really understand it. Thats why I came here
Okay what do you not understand about it
I guess how to set up the tween, Udim...
Okay but the docs show you example code, so tell me what you don't understand from that doc. If you're specific about what you don't understand I can explain things
So im confused, what is tweeninfo used for?
TweenInfo provides details on how the tween should behave. Like how long it should take to get from goal -> destination, whether it should repeat, if it should delay before starting, etc.
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
When you use TweenService:Create, it'll set up the Tween object with all the details it needs, so that when you :Play() it, it knows what to do.