I’m working on a cutscene script that works so that a player can’t move because they will also have a gui. the problem is on line 28 in the local script it says: "PartA is not a valid member of Folder “Workspace.CamParts”. I tried debugging this but it didn’t work.
local script:
local ts = game:GetService("TweenService")
local camera = workspace.Camera
local cutscenetime = 6
local info = TweenInfo.new(
cutscenetime,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
true,
0
)
function tween(part1,part2)
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = part1.CFrame
local tween = ts:Create(camera, info, {CFrame = part2.CFrame})
tween:Play()
wait(cutscenetime)
camera.CameraType = Enum.CameraType.Custom
end
game.ReplicatedStorage.MainMenuActions.OnClientEvent:Connect(function()
tween(workspace.CamParts.PartA, workspace.CamParts.PartB)
tween(workspace.CamParts.PartB, workspace.CamParts.PartC)
tween(workspace.CamParts.PartC, workspace.CamParts.PartD)
end)
Server Script:
game.Players.PlayerAdded:Connect(function(plr)
game.ReplicatedStorage.MainMenuActions:FireClient(plr)
plr.CharacterAdded:Connect(function(chr)
local hum = chr.Humanoid
hum.WalkSpeed = 0
hum.JumpPower = 0
end)
end)