#Can't pass object through remoteevent inside of table

22 messages · Page 1 of 1 (latest)

obtuse tinsel
#

Table:

LockerService.Items = {
    Headgear = {
        {
            Name = "Muskateer",
            Description = "",
            Asset = LockerItems.Headgear.Muskateer,
            RequiredGroupID = 0,
            RequiredGroupRank = 0,
        },
        {
            Name = "Paper Hat",
            Description = "",
            Asset = LockerItems.Headgear.PaperHat,
            RequiredGroupID = 0,
            RequiredGroupRank = 0,
        },
    },
    Hair = {
        {
            Name = "Nerd Hair",
            Description = "",
            Asset = LockerItems.Hair.NerdHair,
            RequiredGroupID = 0,
            RequiredGroupRank = 0,
        },
        {
            Name = "Beautiful Hair For Beautiful People",
            Description = "",
            Asset = LockerItems.Hair["Ultra-Fabulous Hair"],
            RequiredGroupID = 0,
            RequiredGroupRank = 0,
        }
    },
    Accessories = {
        {
            Name = "Hipster Glasses",
            Description = "",
            Asset = LockerItems.Accessories.HipsterGlasses,
            RequiredGroupID = 0,
            RequiredGroupRank = 0,
        },
        {
            Name = "Nerd Glasses",
            Description = "",
            Asset = LockerItems.Accessories.HipsterGlasses,
            RequiredGroupID = 0,
            RequiredGroupRank = 0,
        },
    }
}

I am trying to send the "Asset" field of the first four categories from the server to the client in order to have the client put it on a rig inside of a GUI.
When I print the table received on the client, the "Asset" field is always missing UNLESS it is a string.

obtuse tinsel
#

I want actual help from a human and not from A.I.

#
  • The A.I. is wrong. Since events are handled by the server, data from stuff like ServerStorage can be passed to the client.
amber moth
#

You can't pass instances to and from remote events

#

Change the asset variables into strings, and use a for loop to find an object with the name of the asset string

obtuse tinsel
#

RemoteFunctions*

obtuse tinsel
amber moth
amber moth
obtuse tinsel
amber moth
#

But what you can do is pass the Instance name through and use a for loop to find the instance

cosmic ivy
#

I’m trying to make some module that does pass convert a server script to specific player’s local script

amber moth
#

remote function probably

cosmic ivy
#

Doesnt work

#

Like

#

Lemme give an example

#

Like i have a admin command that executes specific function on others

#

Just like an executor

#

If i write something on executor