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

Setting up a players camera, a little help?

how come this script works:

wait()
local Player = game.Players.LocalPlayer
local Camera = game.workspace.CurrentCamera
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = game.Workspace.CameraPart.CFrame

but this one wont unless you respawn?

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = game.workspace.CurrentCamera

repeat wait()
	Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = game.Workspace.CameraPart.CFrame

1 answer

Try this

	
	local Camera = game.Workspace.CurrentCamera
	local player = game.Players.LocalPlayer
	
	
repeat wait() until player.Character


Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = game.Workspace.Camero.CFrame

script.Parent.Parent.Parent.Stuff.Visible = true



	










2 comments

0

Thank you for the effort, but i wasent looking for a script rather an explanation to why the first code works on spawn and the second one dosent.

0

oh

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