Hey. I'm making a door tween in Roblox, but when I try to define the variables to create a tween, it will put a line under it says it does not exist. Here's my script :
script.Parent.MouseClick:Connect(function()
if script.Parent.Parent.BrickColor == BrickColor.new("Lime green") then
script.Parent.Parent.BrickColor = BrickColor.new("Really red")
local tweenService = game:GetService("TweenService") --Variable to the service.
local Part1 = game.Workspace.PartDoor1 --Variable to a door.
local tweenInfo = TweenInfo.new(
3,
Enum.EasingStyle.Quad,
Enum.EasingDirection,
1,
true,
2
)
end
local Goals = {
Position = Vector3.new(-49.346, 4.165, -117.723)
}
local tween = tweenService:Create(Part1, tweenInfo, Goals) --It won't detect Part1 and
tweenInfo.
tween:Play()
end)
Any help?
