I'm trying to tween a camera, and this is the script I've created so far (this is a local script):
script.Parent.MouseButton1Click:Connect(function()
local tweenService = game:GetService("TweenService")
local part = game.Workspace.CameraPart
local tweeningInformation = TweenInfo.new(
5,
Enum.EasingStyle.Quad,
Enum.EasingDirection.In,
0,
false
)
local partProperties = {
Position = Vector3.new(20.7,8,17.14);
Orientation = Vector3.new(0,90,0)
}
local Tween = tweenService:Create(part,tweeningInformation,partProperties)
Tween:Play()
end)
It's a local script because there was some stuff to do with the Image Button the script was inside of. I've tried putting just the script you see above withing the camera part itself, but I've had no luck. Anyone got any ideas on what I can do to fix this?
