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

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

Asked by 9 years ago

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

Log in to vote
0
Answered by
RedCombee 585 Moderation Voter
9 years ago

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.
0
Oh thanks! Well I made a stupid mistake. :P flamenathan327 20 — 9y
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. flamenathan327 20 — 9y
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. RedCombee 585 — 9y
0
That is what I did. flamenathan327 20 — 9y
0
Well, obviously not. You're setting the camera's C-Frame to a specific value, not the C-Frame of a brick. RedCombee 585 — 9y
Ad

Answer this question