Currently, the Datastore’s value is "".
It completely ignores the check and initiates the code.
if typeof(plrcframe) ~= "string" or plrcframe ~= nil then
print(typeof(plrcframe)) -- prints string, but why does it ignore the previous typeof() check?
player.Character.PrimaryPart.CFrame = CFrame.new(table.unpack(plrcframe))
end
Because of the second part of the or conditional, if it is a string it can’t be nil which means it will execute the code in the if statement anyways. You might want to use and instead:
if plrcframe ~= nil and typeof(plrcframe) ~= "string" then
Or since you are using table.unpack, you can just check if the value is a table: