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

3rd person script why it don't work? [described concisely] [figered out my self]

I dont know why this doesnt work. The CameraPart exist is the serverstorage. You can also see this as toggling shiftlock but with a script

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

Player.CharacterAdded:Wait()

local part = game.ServerStorage.CameraPart:Clone()
part.Parent = game.Workspace
part.Name = Player.UserId
part.Anchored = true
part.Transparency = 1
part.CanCollide = false
part.Orientation = Vector3.new(-13.61, 0, 0)
part.Position = Character.HumanoidRootPart.Position + Vector3.new(2.787, 2.608, 3.825)

repeat wait()
	Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = game.Workspace[Player.UserId].CFrame

3 comments

0

First thing. Since this script manipulates the player's camera, it has to be inside of the local script. Since the camera is all hosted by clients, trying to get the camera from normal script will return an error. Second thing. If this code is inside local script, you won`t be able to access the serverstorage because that is only accessable by server, not client.

0

Oops got second thing lol

0

However this does not fix the code

1 answer

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