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

Why isn't the camera going to the position I want it to go to?

I made a Script with a LocalScript in it and in the Script I typed the following in:

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        script.LocalScript:clone().Parent = character
    end)
end)

In the LocalScript I typed the following:

local cam = workspace.CurrentCamera

cam.CameraType = "Scriptable"
cam.CoordinateFrame.CFrame.new(50, 41, 201)

Please help me! :(

1 answer

In the 4th line of your local script, remember that you're resetting the value of the Coordinate Frame.

cam.CoordinateFrame = CFrame.new(50, 41, 201) -- The equal sign is important; without it you're not doing anything with the C-Frame of the camera.

5 comments

0

Oh thanks! Well I made a stupid mistake. :P

0

I tried that and the camera didn't change at all :( Oh and also I forgot to say that I put the scripts in StarterGui.

0

By the way, it may be easier to place a brick at (50,41,201) and then change the camera's C-Frame to the brick.

0

That is what I did.

0

Well, obviously not. You're setting the camera's C-Frame to a specific value, not the C-Frame of a brick.

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