Need help with Camera Manipulation Error

I’m making a shop system, and i’m trying to add a “cutscene”, but I keep getting this error, I’m trying to figure out what I’m doing wrong.

local Fade = game.ReplicatedStorage:WaitForChild("TeleportationDoorEvent")
local prox = script.Parent.ProximityPrompt --Variable for Proximity Prompt
--- Camera Manipulation
local TweenServ = game:GetService("TweenService")
local CameraFolder = game.workspace.CamMans
local Camera = game.workspace.CurrentCamera
	

function CameraManipulation()
	local ti = TweenInfo.new(
		3,
		Enum.EasingStyle.Cubic,
		Enum.EasingDirection.Out,
		0,
		false,
		0
		
		
	)
	
	Camera.CameraType = Enum.CameraType.Scriptable
	
	
	
	
	Camera.CFrame = CameraFolder.GasStationCam.CFrame
	
	
	task.wait(5)
	
	TweenServ:Create(ti{CFrame = CameraFolder.GasStationCam.CFrame}):Play()
	
end


prox.Triggered:Connect(function(player) --Code runs when the Player triggers the Proximity Prompt
	Fade:FireClient(player)
	prox.MaxActivationDistance = 0
	wait(2)
	CameraManipulation()
	OpenUI:FireClient(player) --Fires the Remote Event
end)```
1 Like

TweenService expects the parameters in the order of:

Instance, TweenInfo, Properties

The way you’ve done it here is you have gave it the TweenInfo while expecting to take the CFrame property out of it.

It should be smthn like:

TweenServ:Create(Camera, ti, {CFrame = CameraFolder.GasStationCam.CFrame}:Play()

Hope this helps!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.