I want to do an intro, for my game, manipulating the camera. I programmed this, but it doesn't work for me when I play it.
local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Camera = workspace.CurrentCamera local playButton = script.Parent.Play repeat wait() Camera.CameraType = Enum.CameraType.Scriptable until Camera.CameraType == Enum.CameraType.Scriptable Camera.CFrame = workspace.CameraPart.CFrame playButton.MouseButton1Click:Connect(function() Camera.CameraType = Enum.CameraType.Custom playButton:Destroy() end)
Basically when I give it to play it does nothing and only shows the play button. It doesn't change my view to the CameraPart.
Hello, nanitook! Great question you asked. I have assembled a script below that should accomplish what you're trying to do.
local Player = game:GetService("Players").LocalPlayer local CamPart = game:GetService("Workspace"):WaitForChild("CameraPart") local Cam = game:GetService("Workspace").CurrentCamera Cam.CameraType = "Scriptable" Cam.CFrame = CamPart.CFrame --Sets the camera CFrame to the part CFrame
This script should work! Make sure this is in a local script and not a server script and it should work just fine!