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

Help With Camera Manipulation?

Asked by 3 years ago

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

0
Is this a server or local script? JustinWe12 723 — 3y
0
its just a normal script under a model Mittens0924 4 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

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
0
Thank you for the help, It worked only thing i had to change was the distance above the dice Mittens0924 4 — 3y
0
Yeah you can change the Vector3 to whatever works best for you. JustinWe12 723 — 3y
Ad

Answer this question