I’m attempting to create a variable which when called it fires the client. Though I cannot name this variable after due to it being a function, so the name is always “RemoteEvent”. Is there some way I could name the new Instance when creating it on the same line?

I know I could just fire it after naming it on another line but I would like it to be compact.

You could put it on the same line, but it wouldn’t be the same line of code. creates a new … well, Instance … which you then give labels and names on new lines of code. You can obviously rename the item after you define the Instance, but you cannot do it right out of the gate on the same line as you create it.

This is most likely because the server needs to create the object before it names it. However, this is a guess, because I don’t think I’ve played around with it to tell.

TL;DR no, sorry.


Alright, Thanks for the answer.

1 Like