Function errors with unable to cast value to objects

This error is thrown when you try to set a property to a type that can’t be cast to its desired type. For example, setting a NumberValue.Value = workspace.Part can’t be done.

So… you should double check that your property setting is being done correctly. Perhaps print() things you’re setting. Also, it helps if you provide the full error and line so we can help you better.

Luau adds this (and others) as a first-class feature, actually! :slight_smile:

1 Like