trying to make the camera move when the player touches part. it is not working, here is script:
tweenservice = game:GetService("TweenService")
local Workspace = game:GetService("Workspace")
currentcamera = Workspace.CurrentCamera
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
local ti = TweenInfo.new(5, Enum.EasingStyle.Quad, Enum.EasingDirection.In, 0)
local goal = script.Parent.Point.CFrame
local animation = tweenservice:Create(currentcamera, ti, goal)
animation:Play()
end
end)
this came up in output:
16:35:38.929 - Stack Begin
Alright, I took a look at my script for camera work and you will need to change a few things.
You are going to need 2 positions, 1 for where the camera is, and 1 for where you want the camera to actually be facing.
Then you want to have
local goal = {CFrame = CFrame.new(Position1, Position2)}
And that should work
Position1 being where you want it to be, Position2 being where you want it to face
Always remember that only LocalScripts can access “CurrentCamera”, or things like “LocalPlayer”. Hence why they have something like “Local” or “Current” in their names.