Hello!
I have a camera that tweens, however it’s a bit choppy, is there a way to get around it, or is it due to the screen blur effect?
TIA for any help!
Example of what’s going on:
Script:
game.Players.LocalPlayer.CharacterAdded:Wait()
local cc = workspace.CurrentCamera
cc.CameraType = Enum.CameraType.Scriptable
cc.CFrame = CFrame.new(-0.1, 30, 5)
local blur = cc:FindFirstChildOfClass('BlurEffect')
if blur then blur:Destroy() end
blur = Instance.new('BlurEffect', cc)
blur.Size = 12
game.Players.LocalPlayer.CameraMaxZoomDistance = 50
local TS = game:GetService('TweenService')
if script.Parent.PlayClicked.Value == false then
while true do
local tween = TS:Create(cc, TweenInfo.new(.1, Enum.EasingStyle.Linear), {CFrame = cc.CFrame * CFrame.Angles(0, math.rad(1), 0)})
tween:Play()
tween.Completed:Wait()
if script.Parent.PlayClicked.Value == true then
TS:Create(blur, TweenInfo.new(0.5), {Size = 0}):Play()
for i,v in pairs(script.Parent:GetDescendants()) do
if v:IsA('TextLabel') or v:IsA('TextButton') then
TS:Create(v, TweenInfo.new(0.5), {TextTransparency = 1, BackgroundTransparency = 1}):Play()
elseif v:IsA('Frame') then
TS:Create(v, TweenInfo.new(0.5), {BackgroundTransparency = 1}):Play()
elseif v:IsA('ImageLabel') then
TS:Create(v, TweenInfo.new(0.5), {BackgroundTransparency = 1, ImageTransparency = 1}):Play()
end
end
cc.CameraType = Enum.CameraType.Custom
cc.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
wait(0.5)
for i,v in pairs(script.Parent:GetDescendants()) do
if v:IsA('GuiObject') then
v.Visible = false
end
end
for i,v in pairs(script.Parent.Parent:GetChildren()) do
if v ~= script.Parent and v:IsA('ScreenGui') then
v.Enabled = true
end
end
break
end
end
end