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)```