Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why does this line give me an error?

The line:

local cred= {bin.Blade.BrickColor = BrickColor.new("Really red")
--- the end of the table is a multilined one, so it ends lower down the script

gives me the error "Expected a name, got a complex expression." Why is this?

1 answer

✓ Accepted answer
local cred = bin.Blade
cred.BrickColor = BrickColor.new("Really red")

You were assigning a userdata to a value within a table.

1 comment

0

Thanks, in the end I just changed everything in my script so I didn't have to mess about with tables, but thanks anyways :)

This discussion is preserved as it was. New answers, comments, and votes are closed.