Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Setting Camera to part on Join?

Asked by 10 years ago

I want to set the player's camera to a part when joining, but the script isn't working.

start = "while "

local p = "game.Players.LocalPlayer"
cam1 = "true "
local cam = "Camera"
local part = game.Workspace.Tram.Camera

cam = cam.."CameraType"
string = "do "
cam = cam.."Part"

loadstring(start..cam1..string.."end")()
1
Roblox disabled 'loadstring' for client-sided coding. :/ TheeDeathCaster 2368 — 10y

1 answer

Log in to vote
0
Answered by
Merely 2122 Moderation Voter Community Moderator
10 years ago

As TheAlphaStigma mentioned, client-side loadstring is now disabled. Additionally, this is a really bad way of doing things.

Just add a LocalScript to StarterGui:

local camera = game.Workspace.CurrentCamera
local part = game.Workspace.Tram.Camera -- part to focus on
camera.CameraSubject = part
Ad

Answer this question