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

How would I go about making this camera script local?

I want to make this camera script local. What I mean by that is, this 1 camera is the camera for everyone meaning it never changes, so I wanted to make it so every character has a individual camera. Meaning so if they step on the part to change cameras they wont change the camera for the whole server.

Heres the script -

local cam = workspace.CurrentCamera
local Camera1 = game.Workspace.Cameras.Camera1

cam.CameraType = Enum.CameraType.Scriptable
cam.CameraSubject = Camera1
-------------------------------------------------------------------
while wait() do
	cam.CoordinateFrame = CFrame.new(Camera1.Position)
end
-------------------------------------------------------------------

1 comment

0

put a local script in starter player, i hope that works

1 answer

✓ Accepted answer

I'm not sure If this is what you mean, but here is what I've interpreted on what I think you mean.

NOTE: MAKE SURE THIS IS A LOCAL SCRIPT.

local cam = workspace.CurrentCamera
local Camera1 = game.Workspace.Cameras.Camera1

script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then

script.Parent = game.Players.LocalPlayer.PlayerGui

cam.CameraType = Enum.CameraType.Scriptable
cam.CameraSubject = Camera1
-------------------------------------------------------------------
while wait() do
    cam.CoordinateFrame = CFrame.new(Camera1.Position)
end
end
end
-------------------------------------------------------------------

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