I've heard of CFrames but I just noticed that in the Value Class there is an object named CFrameValue, but it doesn't actually allow you to input a value for it? Does anyone know how these work and what they are useful for?
Why and what do CFrameValues do? What are they useful for?
1 answer
Basically, CFrameValues can only be edited through scripts (as CFrames are a kind of complex data type), so you have to go:
CFrameValue.Value = CFrameHere
in a script to set it.
I disagree that values should be deprecated, they can be used for various things that can't be easily done otherwise.
For example, as TheRevealerYT said, they allow models to be easily tweened. While TweenService usually only works with specific properties, it wont work with tweening functions such as SetPrimaryPartCFrame or MoveTo, which are used to move models. To solve this, you can run the tween on a CFrameValue, and update the model location on the .Changed of this value. For example, something like this:
local EndModelCFrame = workspace.EndPart.CFrame
local Model = script.Parent --set to model
local CFVal = Instance.new("CFrameValue")
CFVal.Value = Model.PrimaryPart.CFrame
local Info = TweenInfo.new(3)
local Goal = {}
Goal.Value = EndModelCFrame
local Tween = game:GetService("TweenService"):Create(CFVal,Info,Goal)
Tween:Play()
CFVal.Changed:Connect(function()
Model:SetPrimaryPartCFrame(CFVal.Value)
end)
will let you tween whole models as one.
Furthermore, values in general can be helpful when you want to send information to clients from the server in very short intervals. Using values instead of remote events for something like a countdown timer can save remote bandwidth, allowing you to sync the timer with all clients (the LocalScripts would watch for the .Changed of the value).
Hope this helps!
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
You can only put a CFrame into it via a script/localscript.
You can use it to tweenmodels
How?
meh, all the value instances should be deprecated, you shouldn't really ever need them.