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

Am I doing something wrong with camera interpolation??

Asked by 5 years ago
Edited 5 years ago

I've been trying to make a script for a GUI which when the mouse enters it uses camera interpolation to move the camera to another part. It works to start with, starting to move towards the part when I move the mouse into the GUI, but when it reaches it the screen turns black and I'm not sure why. The code:

script.Parent.MouseEnter:connect(function(z)
    cam = workspace.CurrentCamera
    cam.CameraType = "Scriptable"
    cam.CameraSubject = workspace.camerapart
    cam:Interpolate(workspace.pandacam.CFrame,workspace.pandacam.CFrame,0.5)
end)

Edit I've also tried doing it in another new place and the screen also goes black when it reaches it. I'm thinking this could be an issue with roblox studio since no one's given any answers yet. I've also asked a friend to try it and he had the same issue.

0
The camera is most likely going into the part when that happens. Offset it slightly. Thundermaker300 554 — 5y
0
How can I do that?? I haven't used CFrame for a bit so I can't think of it off the top of my head. BetterNotDie 11 — 5y
0
Nevermind, I tried it and the screen still went black. BetterNotDie 11 — 5y

Answer this question