I’m trying to get a part in my game to rotate using tween service and fling the player however when I test the script it shows the error " Unable to cast to Dictionary"
local TweenService = game:GetService("TweenService")
local Part = script.Parent
local goal = {Vector3.new(0, -180, 60)}
local info = TweenInfo.new(
1,
Enum.EasingStyle.Bounce,
Enum.EasingDirection.Out,
0,
true,
0
)
local partTween = TweenService:Create(Part, info, goal)
Part.Touched:Connect(function(OtherPart)
partTween:Play()
end)
I have tried to fix it with another post which said to change the goal variable to local goal = {position = Vector3.new(0, -180, 60)} but that gives me a different error
" TweenService:Create no property named ‘position’ for object 'MainPartSpatchula"
I’m not very experienced with scripting or the tween service but the error seems to be common.
Thanks for the help!