#How do I tween the CurrentCamera property smoothly to the players cam or clients cam
67 messages · Page 1 of 1 (latest)
you can tween it's CFrame
Please read it through. I explained as good as i can what everything is and why its there. There is also some things you might wanna change.
local ts = game:GetService("TweenService")
local endGoal = CFrame.new() —put in the numbers of the CFrame here.
local tweenCam = ts:Create(workspace.CurrentCamera, --instance that should be tweened
TweenInfo.new(
0.5, --the time the tween will take to finish in seconds. Change upon your liking.
Enum.EasingStyle.Linear, --the looks of the tween.
Enum.EasingDirection.In, --the direction of the EasingStyle
false, --reverses?
0, --repeat times, if set to -1 it will repeat forever.
0 --delaytime between repetitions.
),
{CFrame = endGoal} --list of properties that should be changed during tween.
)
tweenCam:Play() --plays the tween
Thank you sorry i was sleeping or ethier in school
but ty
btw while your here do you know how to fix the error where it says "Attempt to index nil with cframe"
in what script?
hold on let me get that for you
alr
** You are now Level 1! **
just send it nontheless
this line is the sinner
i belive
local Cam = workspace.Cams:FindFirstChild("PartCam") or workspace.Cams:WaitForChild("PartCam")
no that line is fine
i think
its
it says its the CurrentCam prop of workspace
and for some odd reason everytime i move the cam out of the baseplae or higher it gives me the error sometimes
but tbh rn its working so idk
if it is this line what should i put there?
yea but like im trying to tween it to the players cam how would i do that?
i know i have to use CFrame
tween it's CFrame to the CFrame of the player's Camera
CurrentCamera.CFrame
oh wait nvm i get what you saying thank you a bunch
** You are now Level 2! **
still need help with this btw ~~
client doesnt have a cam
...
since you said client doesn't have a cam I'm confused?
omg i give up
wait no bro
im just asking
jeez
i get what your saying
so do i just tween to the player?
yk what whatever ill just figure it out
anyway ty for the help
how do I fix this then?
whatever you tried to index with .CFrame didn't exist
I know but is there a work around cause usually when something doesn't exist your supposed to use WaitForChild but since this is a property of the workspace I cant use that so again what do I do?
what was it you were trying to index with .CFrame? the CurrentCamera?
Got it to work but how do i make it go smoothly down like i want it to not turn
