Unable to cast to Dictionary

Context


So I am making a tween that moves something to another position.
Now I have a module that has the tween info in it.


Problem


anyhow when I call upon the tween it says:

Unable to cast to Dictionary.


so why is this happening?


Code


Script:

				local hitPo = raycast.Position
				
				-- move the player to the new position.
				local tweenService = game:GetService('TweenService')
				
				local info = details.tweenInfo
				
				local tween = tweenService:Create(char.PrimaryPart,info,hitPo)
				
				tween:Play()

Module script.

module.details = {
		tweenInfo = TweenInfo.new(
			0.5, -- time it takes to reach goal.
			Enum.EasingStyle.Linear,
			Enum.EasingDirection.Out,
			-1, -- repeat count???
			false,
			0 -- delay time
		)


}

also for tween info. What is the repeat count do?


~Froyo~

The last argument is a supposed to be a dictionary

{
   [PropertyToTween] = NewValue
}

How many times the tween will repeat itself

So what would setting it to -1 do?
should I just set it to 0?

If you don’t want it to repeat, then yes; -1 makes it repeat infinitely

1 Like

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