Hello DevForm member. I recently tried to modify one of my scripts to add a camera tween (knowing that it works without the tween). So, with the tween it returns an error Attempt to call a nil value
The Script :
Tween(workspace.Camera, 1.5, {CFrame = CurrCamera.CFrame})
Tween = function(Obj, Time, Settings)
game:GetService("TweenService"):Create(Obj, TweenInfo.new(Time), Settings):Play()
end
Before you ask, I check the value of CurrCamera and this is a part so the problem is not coming from this
*If i do workspace.Camera.CFrame = CurrCamera.CFrame instead of tween its working
I found the problem, @treebee63 and @TypicalHB was half right. My function could be generated afterwards but it didn’t work because it was in a while true, which prevents the end of the code from being executed and therefore the function from existing