Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Camera Manipulation Wont work?

When Streaming Enabled is on, It prints "CameraPart is not a valid member of Workspace "Workspace" "

Obiously theres more code, but the issue is it cant find the camerapart thats all. I have no clue what to do.

game.ReplicatedFirst:RemoveDefaultLoadingScreen()
local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local Player = game.Players.LocalPlayer
local Workspace = game:GetService("Workspace")
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
local PlayButton = script.Parent.PlayButton
local Gui = script.Parent.Parent
PlayerGui:SetTopbarTransparency(1)

pcall(function()
	local starterGui = game:GetService('StarterGui') -- makes topbar aka chat, playerlist gone.
	starterGui:SetCore("TopbarEnabled", false)
end)

repeat wait()
	Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.CameraPart.CFrame
script.Parent.IntroSound.Playing = true
wait(3.5)
script.Parent.Creator.Visible = true
script.Parent.Flux1.Visible = false
script.Parent.Flux2.Visible = false
script.Parent.Flux3.Visible = false
script.Parent.Flux4.Visible = false
wait(7)

1 comment

0

maybe you can move the player near that area

1 answer

During StreamingEnabled, parts don't load in unless the character is close to them. Meaning, you need to use WaitForChild.

Camera.CFrame = workspace:WaitForChild("CameraPart").CFrame -- Integrate WaitForChild into line 19!

I hope this helped! =D

1 comment

0

Studio no longer gives me the error of not found, but it still wont switch the camera.

This discussion is preserved as it was. New answers, comments, and votes are closed.