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

Help With Camera Manipulation?

Ive been trying to make a Dice have a random Orientation and drop. Then I want a camera to go to the dice and hover over it. I haven't got down the camera stuff yet and need help with it. I have one script in side the Dice, the script looks like this

local Dice = script.Parent local Cam = game.Workspace.CurrentCamera local Object = game.Workspace.Part

Object.CanCollide = false Object.Anchored = true

Cam.CameraSubject = Object Cam.CameraType = Enum.CameraType.Scriptable

Object.Orientation = Vector3.new(0, 0, 90)

Dice.Orientation = Vector3.new(math.random(0, 360), math.random(0, 360), math.random(0, 360)) wait(5) Dice.Anchored = false wait(10) Dice.Anchored = true wait(0.1)

i've mostly been using just run mode btw

2 comments

0

Is this a server or local script?

0

its just a normal script under a model

1 answer

✓ Accepted answer

After your code you can add

Cam.CameraType = Enum.CameraType.Scriptable
Cam.CFrame = CFrame.new(Dice.Position + Vector3.new(0,10,0), Dice.Position) -- changes the position of camera above the dice 
wait(5) -- You can change it to however long you want it to hover
Cam.CameraType = Enum.CameraType.Custom -- Changes the camera back to player

2 comments

0

Thank you for the help, It worked only thing i had to change was the distance above the dice

0

Yeah you can change the Vector3 to whatever works best for you.

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