Need help with TweenService

Hi!
I want to made a TweenAnimation that smoothly changing a Position but this script doesn’t work :sob:

The script:

local function Open()
	local TweenService = game:GetService("TweenService")
	local part = script.Parent

	local Info = TweenInfo.new(
		0.8, -- Length
		Enum.EasingStyle.Linear, -- Easing Style
		Enum.EasingDirection.Out, -- Easing Direction
		0, -- Times repeated
		false, -- Reverse
		0 -- Delay
	)

	local Goals =
		{
			Positon = UDim2.new(24.989, 6.899, -40.33);
		}

	local tween = TweenService:Create(part,Info,Goals)

	tween:Play()
end

local function Close()
	local TweenService = game:GetService("TweenService")
	local part = script.Parent

	local Info = TweenInfo.new(
		0.8, -- Length
		Enum.EasingStyle.Linear, -- Easing Style
		Enum.EasingDirection.Out, -- Easing Direction
		0, -- Times repeated
		false, -- Reverse
		0 -- Delay
	)

	local Goals =
		{
			Position = UDim2.new(36.679, 6.899, -40.33);
		}

	local tween = TweenService:Create(part,Info,Goals)

	tween:Play()
end

local isOpened = false
local Proximity = script.Parent.ProximityPrompt

if isOpened == false then
	Proximity.ActionText = "Open door"
	Proximity.Triggered:Connect(function(player)
		Open()
	end)
elseif isOpened == true then
	Proximity.ActionText = "Close door"
	Proximity.Triggered:Connect(function(player)
		Close()
	end)	
end

Error:

I don't know I have a Cartoon Font in Output, Just I like this font

You spelled Position wrong, at least that’s what it says in the error message.

3 Likes

You made an mispell it’s Position not Positon

1 Like

Thanks, I need to see an ophthalmologist

1 Like

As other people said the error clearly states that you’re misspelling the property “Position”. And also looking at the source code, you also forgot to toggle the variable IsOpen after openning or closing the UI

2 Likes

That one little spelling mistake: :evil:

2 Likes