3. What solutions have you tried so far?
I am very bad at scripting so I searched for a tutorial how to make a tweening frame. But every time I try it it goes wrong…
It is kind of like a system as in Welcome To Bluxburg. When u click the ‘Help’ button a frame tweens to the middle of your screen.
local TweenService = game:GetService("TweenService")
TweenService:Create(Frame,TweenInfo.new(1 --[[ time till tween finishes]], {Position = Udim2.new(0.5,0,0.5,0)}):Play()
It usually goes into a local script, but you can put it anywhere =) you just need to make sure local Frame = script.Parent.Parent.Frame exists, if It’s placed in a button to get the object.
Example:
local Button = script.Parent.Button
local Frame = script.Parent.Frame
Just need to get the exact object you’re tweening.
Try creating a dummy frame and set its position to that of which you are tweening to, then see if it is correct. If not, then just keep doing it until you get it right.
ExampleTweenService.rbxl (26.5 KB)
Here : ) this should help you understand, it’s actually very simple.
Code;
local TS = game:GetService("TweenService")
local on = false
script.Parent.TextButton.MouseButton1Click:Connect(function()
if on then on = false
TS:Create(script.Parent.Frame,TweenInfo.new(1),{Position = UDim2.new(0,0,0.5,0)}):Play()
else on = true
TS:Create(script.Parent.Frame,TweenInfo.new(1),{Position = UDim2.new(0.5,0,0.5,0)}):Play()
end
end)