local Tween = script.Parent:TweenPosition(UDim2.new(-1.063, 0,-0.008, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Sine,1)
Tween:Play()
if Tween then
print("Playing")
else
print("Error")
end
The last parameter of the built-in tweening for GuiObjects is a callback that happens when the tween is finished/stopped, you can do something like this and do something with the returned state
script.Parent:TweenPosition(UDim2.new(-1.063, 0,-0.008, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Sine,1, true,
function(state)
print(state)
end
)
I also recommend using Enums instead of their names
The only thing I can think is that you’ve got the coordinates messed up. Try copying the coordinates and pasting it into the frames position and see if it’s the same position
I believe checking would only work for when using TweenService checking if a Tween is playing or not, TweenPosition is just a quick GUI transition without using the TweenService I believe
Can you try this?
local Frame = script.Parent
local TweenService = game:GetService("TweenService")
local TweenStuff = TweenInfo.new(
Enum.EasingDirection.Out; --The EasingDirection
1; --The Duration
0; --Delay time when it's called
0; --Repeat? Set as 0 if you want to play it once
Enum.EasingStyle.Sine; -- The EasingStyle
false --Reverses the Tween, otherwise set to false
)
local Properties = {Position = UDim2.new(-1.063, 0,-0.008, 0)}
local PlayTween = TweenService:Create(Frame, TweenStuff, Properties)
PlayTween:Play()
PlayTween:GetPropertyChangedSignal("PlaybackState"):Connect(function()
print("The current tween state is: ", PlayTween.PlaybackState)
end)
I SWEAR I’M GOING TO SMACK MY COMPUTER FOR EVERY TIME IT FREEZES