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

Intro camera manipulation ?

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.

1 comment

0

You need to set the CameraSubject

1 answer

✓ Accepted answer

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!

8 comments

0

What have you changed?

0

Still not working :(

0

Works fine for me.

0

And where is the script located [what service]?

0

its in StarterGui

0

May I see the full script? It seems to work fine with me. Are any errors occurring?

0

Try setting the camera subject.

0

it works now, i removed an admin script and work

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