Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Everytime I use tween on a GUI, it says Unable to Cast to Dictionary?

Full Script:

local tweenservice = game:GetService("TweenService")
local slider = script.Parent.Parent.Slider
local endpoint = {
	UDim2.new(0.538, 0, 0, 0);
} 

local info = TweenInfo.new(
	1,
	Enum.EasingStyle.Circular,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)

 -- Error
local slideanim = tweenservice:Create(slider, info, endpoint)

script.Parent.MouseButton1Click:Connect(function()
	slideanim:Play()
end)

Picture in explorer:

image

1 comment

0

Try assigning what property to animate for your slider in endpoint. Try Position = UDim2.new(0.538, 0, 0, 0)

1 answer

✓ Accepted answer

You need to specify the property you want to change.

If you want to change the position then do:

local endpoint = {
    Position = UDim2.new(0.538, 0, 0, 0);
} 

Hope I helped!

This discussion is preserved as it was. New answers, comments, and votes are closed.