rojo-rbx / remodel

Scriptable Roblox multitool: Manipulate instances, model files, places, and assets on Roblox.com
MIT License
169 stars 38 forks source link

setRawProperty not working #30

Closed TacticalTux closed 3 years ago

TacticalTux commented 3 years ago
local test = Instance.new("StringValue")
remodel.setRawProperty(test, "Value", string, test)

(or)

local test = Instance.new("StringValue")
remodel.setRawProperty(test, "Value", "string", test)
[ERROR] callback error: error converting Lua table to String (expected string or number): stack traceback:
                [C]: in ?
                [C]: in field 'setRawProperty'
                [string "remodel.lua"]:2: in main chunk

        Caused by:
            error converting Lua table to String (expected string or number)

Upon attempting to read and write script objects, I encountered an error using setRawProperty, and upon further testing, it seems to be impacting it as a whole above. Failing code is above, with the error below it.

LPGhatguy commented 3 years ago

This API usage is not correct. The signature of setRawProperty lays out the required types.

Here is an example from the Remodel test suite that shows how to use setRawProperty. For your example, you should write something like this:

local test = Instance.new("StringValue")
remodel.setRawProperty(test, "Value", "String", "Hello, world!")