Closed Zyrakia closed 3 years ago
Can you send your PlayerData
interface?
This is the interface at the time of the error.
interface PlayerData {
customName: string;
playMinutes: number;
font: Enum.Font;
color: Color3;
gradient: ColorSequence;
gradientEnabled: boolean;
idle: boolean;
readonly premium: boolean;
}
I see. Enums aren't fully functional with unions yet. As a temporary workaround, you can use the name of fonts as an alternative (Exclude<keyof typeof Enum.Font, "GetEnumItems">
) which can then simply be accessed via Enum.Font[name]
I have a remote function set up to update PlayerData, which looks like this:
When attempting to compile this it exceeds the maximum call stack size and does not compile, is there any way to rectify this? Because this function is designed to take in PlayerData that should be updated, and then on the server it checks if the player that invoked the function has access to change the data that they changed, if they do it will return the new data to them, otherwise it will return nothing.
By removing
Partial
it compiles, but I specifically want that the function to be used to update parts of the data, without having to reconstruct the complete data and only changing the value that you want changed.Versions:
Stack trace: