Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make the Camera move smoothly to look at a part?

Asked by 4 years ago

I am trying to make the player's camera move when they hit a gui. But the only problem is that this error keeps on coming up. But I can't figure out how to fix it. The script is

local Workspace = game:GetService("Wrokspace") local TeenService = game:GetService("TweenService")

local CurrentCamera = Workspace.CurrentCamera

function OnClick() CurrentCamera.CameraType = Enum.CameraType.Scriptable local TI = TweenInfo.new(5, Enum.EasingStyle.Quad, Enum.EasingDirection.In, 1) local Goal = (CFrame = Workspace.BigShip.CFrame) local Animation = TeenService:Create(CurrentCamera, TI, Goal) Animation:Play()

The Error : 17:34:37.267 - Players.NovaGooBoom.PlayerGui.ScreenGui.TextButton.Upgrade Thing:9: Expected ')' (to close '(' at column 14), got '='

1 answer

Log in to vote
1
Answered by 4 years ago

game:GetService("Workspace") is spelt wrong

Ad

Answer this question