I am trying to create a door that, when activated with a Proximity Prompt, will tween the part's position to try to the door visually swing open.
I believe I am typing the code right, yet whenever I hit Play and activate the Proximity Prompt, I get the error message: "Unable to cast to Dictionary"
Any idea what I could be doing wrong? Here is the code:
local TweenService = game:GetService("TweenService")
local door = workspace.Door
script.Parent.Triggered:Connect(function()
print("Open")
local tweenInfo = TweenInfo.new(
2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In
)
local goalPos = Vector3.new(-11.45, 3, -2.2)
local tween = TweenService:Create(door, tweenInfo, goalPos)
end)

2 comments
It worked! Thanks so much!
Np