What do you want to achieve? I want to create a simple TweenService that moves a part from one position to another and then back to its origin again and again.
What is the issue? Whenever I run the game/play it says “Unable to cast Dictionary to TweenInfo” .
What solutions have you tried so far? I’ve looked everywhere and nothing works sadly.
local tweenService = game:GetService("TweenService")
local part = script.Parent
local tweeninfo = TweenInfo.new(
5,
Enum.EasingStyle.Sine,
Enum.EasingDirection.InOut,
-1,
true,
0
)
local endgoal = {}
endgoal.Position = Vector3.new(742.352, -8.475, -209.952)
local tween = tweenService:Create(part, TweenInfo, {Position = endgoal})
tween:Play()