Why can't Enum be modified? i was scripting something for a gui and doesen't let me "modify" Enum with scripting
local Changelog = script.Parent.Parent.Changelog script.Parent.MouseButton1Click:connect(function() Changelog:TweenPosition(UDim2.new(0, 0,0.223, 0)) Enum.EasingStyle.Quart = Enum.EasingDirection.Out wait(1) script.Parent:TweenPosition(UDim.new(-0.15, 0,0, 228)) Enum.EasingStyle.Quart = Enum.EasingDirection.Out end) -- {0, 0},{0, 228} --{0, -210},{0.223, 0} -- Those are for helping me ;v
You're attempting to assign an enumeration to another enumeration - you can't do that and you're also using TweenPosition the wrong way.
Changelog:TweenPosition(UDim2.new(0, 0, 0.223, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad) wait(1) script.Parent:TweenPosition(UDim2.new(-0.15, 0, 0, 228), Enum.EasingDirection.Out, Enum.EasingStyle.Quart)
Also, why the Unable to cast UDim to UDim2 error happens because you're using a UDim, when the expected date type is supposed to be UDim2.
Here's a tip for you: A function's parameters that's expected to be enums can have their arguments passed as the enum's name.
Here's what I mean:
Changelog:TweenPosition(UDim2.new(0, 0, 0.223, 0), 'Out', 'Quart')
With that, you can just type in 'Out' instead of Enum.EasingDirection.Out
Not sure if this will help but I never use Enum to change the Easing style of a Tween I just use this
local frame = script.Parent frame:TweenPosition(UDim2.new(0,0,0,0), 'Out', 'Elastic', 2)