I’m having an issue where the player’s camera isn’t updating to the new CFrame. This is for a tutorial UI, where a person would be talking to them and their camera will be updating to a new spot where it talks about the location, but I’m having an issue.
Before this script happens, the Main Menu Screen appears and the player can Click How To Play. When they click that, it transitions over to the new camera location.
- Loading Screen
- Menu Menu
- Inside the Main Menu, the camera is moved to be in front of the building.
*User can click How to Play - Should, but isn’t updating their camera.
This is the script that I’m using. The top bits are useless as they are just tweeting, but for some parts, I’m trying to make it so the camera resets back to the user, then goes back to scriptable, but it isn’t working. I ain’t getting any error codes or anything, and the text updates, but the camera position doesn’t change.
HOW TO SCRIPT:
script.Parent.MouseButton1Click:connect(function()
local camera = game.Workspace.CurrentCamera
local blur = game.Lighting.BlurMenu
wait(0.1)
script.Parent.Parent.Parent.Parent.Cover:TweenPosition(UDim2.new(0.5,0,0.5,0), "Out", "Sine", 1)
wait(1)
blur.Size = 11
script.Parent.Parent.Parent.Parent.Main.Visible = false
script.Parent.Parent.Parent.Parent.Back.Visible = false
script.Parent.Parent.Parent.Parent.Stars.Visible = false
camera.CameraType = Enum.CameraType.Custom
wait(3)
script.Parent.Parent.Parent.Parent.Cover:TweenPosition(UDim2.new(0.5,0,2,0), "Out", "Sine", 1)
script.Parent.Parent.Parent.Parent.Parent.TutorialChat.Frame:TweenPosition(UDim2.new(0.5,0,0.5,0), "Out", "Quint", 1)
wait(3)
local cameraposition1 = game.Workspace.Cameras.c1.CFrame
wait()
camera.CameraType = "Scriptable"
camera.CFrame = cameraposition1
local text = [[Welcome to ..., “...]]
for i = 1, #text do
script.Parent.Parent.Parent.Parent.Parent.TutorialChat.Frame.text.Text = string.sub (text, 1, i)
SoundEffect()
wait()
end
wait(1)
If anyone knows how to fix this, that’ll be helpful. Thanks!