I cant figure out whats causing the "Unable to cast to Dictionary error"

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want my player to tween forward a bit.

  2. What is the issue? Include screenshots / videos if possible!
    The issue is that when my function gets fired a error happens. This is my code

		local AnimPlay = Animator:LoadAnimation(Attack["A".. ComboNumber])
			AnimPlay:Play()
			AnimPlay:GetMarkerReachedSignal("MovementEvent"):Connect(function()
				print("AnimEventFired")
				local Goal = Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -5)
				local TweenService = game:GetService("TweenService")
				local Tween = TweenService:Create(Character.HumanoidRootPart, TweenInfo.new(0, 0.2), {Goal}):Play()
				
			end)
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I have been looking around for around 20 minutes and havent been able to find a solution that works for me.

Can you provide the error and its stacktrace?

What is line 98 in your script?


its the tween

It should be {CFrame = Goal} because the third parameter of TweenService:Create() is a dictionary of properties to values.

It worked thanks allot. I haven’t used roblox studio in a while :smiley:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.