Need help with "unable to cast dictionary"

Hello, i’m sorta stuck. I’ve been trying to make a tween but it just says “Unable to cast dictionary” It is very annoying as well.

Anyone know how to fix this?

rs.RenderStepped:Connect(function()
	
	-- MiddleUI
	for i,v in pairs(MiddleUI.InfoHolder:GetChildren()) do 
		-- variables 
		local Holder = MiddleUI.InfoHolder
		local InformationText = Holder.Info
		local SkipDisplay = Holder.Skip
		local Title = Holder.Title
		local About = Holder.WhatWereLearning
		local Case = Holder.Case
		local Active = Holder.Actived
		-- Changing "cases"

		

		UIS.InputBegan:Connect(function(Key)
			if Key.KeyCode == Enum.KeyCode.Space and Active.Value == true then
				local properties = {Position = 0.247, 0,-0.484, 0}
				local Info = TweenInfo.new(0.5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
				local MiddleUIFrame = ts:Create(Holder,Info,properties)

				MiddleUIFrame:Play()


			end
		end)
		
		if Case.Value == "PlayerWarning" then			
		end
	end
end)


Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like

This line is causing the issue:

{Position = 0.247, 0,-0.484, 0}

When describing an object position or size the Vector3 constructor should be used:

{Position = Vector3.new(0.247, 0,-0.484, 0)}

I tried that at first but it gave me an error so I tried another solution, but now I’m back with the first error.

What is the first error? (tcharacter limit aaaa)

I just realized it’s UI, in that case you must use UDim2.

1 Like

Oh god, that right. Thank you for helping.