I was trying to create a tween for a shop gui I was making and every time I clicked the button an error would show up in the output. It would say “Unabled to cast string to token.” Here is my script:
local Button = script.Parent.ImageButton
Button.MouseButton1Click:Connect(function(player)
Frame:TweenPosition(UDim2.new(0.258, 0,0.163, 0),"Out","Bouncy",1)
end)
local Button = script.Parent.ImageButton
Button.MouseButton1Click:Connect(function(player)
Frame:TweenPosition(UDim2.new(0.258, 0,0.163, 0),"Out","Bouncy",1)
end)
String’s aren’t recommended when you can use Enums. Can you try Frame:TweenPosition(UDim2.new(0.258, 0,0.163, 0), Enum.EasingDirection.In, Enum.EasingStyle.Linear, 1)