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

Camera is randomly going somewhere i'm not setting it?

Asked by
CPF2 406 Moderation Voter
5 years ago
Edited 5 years ago

I am honestly confused as to why this is happening, all I am doing is tweening the camera, and it is tweening fine, but when it reaches the end, it flies off randomly. It was working fine a few days ago, but now it suddenly does this.

https://my.mixtape.moe/ahtxjb.gif

This is when I try to tween it back.

https://my.mixtape.moe/mplgig.gif

I have checked my CFrame calculations and they work fine when I set a part's CFrame there, but for some reason, this happens when I tween the camera.

-- First Gif
local tween = TweenService:Create(
    camera,
    TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
    {
        CFrame = CFrame.new(closestPart.CFrame.p + Vector3.new(0,15,0),closestPart.CFrame.p),
        Focus = closestPart.CFrame
    }
)

tween:Play()

-- Second Gif
local tween = TweenService:Create(
    camera,
    TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
    {
        CFrame = CFrame.new(closestPart.CFrame.p + Vector3.new(0,25,0),closestPart.CFrame.p),
        Focus = closestPart.CFrame
    }
)

tween:Play()
2
Reallyyy don't want to click on those links. Might be safe but yea... xPolarium 1388 — 5y
1
This could be a problem with Roblox's recent player script update. See the devforums on recent updates. xPolarium 1388 — 5y
0
Wow! thanks, that was exactly the problem!!! CPF2 406 — 5y

Answer this question