Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

ViewPortFrame not tweening with my script?

Asked by 3 years ago

What I want is that when my datastore scripts get loaded from the ServerScriptService, it fires a RemoteEvent that runs the Intro script below. It fires the event, and the script works perfectly. But the ViewPortFrame doesn't tween from it's position.

local ViewPortFrame = script.Parent.ViewPortFrame
ViewPortFrame.Position = Udim2.new(-1,0,0,0)

script.Parent.RemoteEvent.OnClientEvent:Connect(function()
    ViewPortFrame:TweenPosition(Udim2.new(1,0,0,0), Enum.EasingDirection.Inout,Enum.EasingStyle.Circular, 10)
end

It doesn't show errors.

1 answer

Log in to vote
0
Answered by 3 years ago

Now I know the reason. it is because that function GuiObject:TweenPosition() doesn't support the Enum.EasingStyle.Circular or Enum.EasingStyle.Exponential . Now I have put any other EasingStyle and it works perfectly!!

Ad

Answer this question