Should I use one remote event for my Dress Up system or multiple?

I have a dress up system which has 3 different sections:

  1. Clothes
  2. Faces
  3. Accessories

I have a local script waiting for buttons to be pressed, and then fires a remove event to a server script to change the player’s avatar. So essentially:

changeFaceButton.Activated:Connect(function()
	event:FireServer()
end)

changeAccessoriesButton.Activated:Connect(function()
    event:FireServer()
end)

I have 3 different functions to apply each type of data, a function for applying accessories, a function for applying faces, and a function for applying clothes

My question is, should I use multiple events for this, or only one?

Should I have 3 different remote events, 1 for each type of data?

Or should I instead have 1 remote events to handle all character changes? If so, would I do it like this?

    local function onRemoteEvent(eventType)
       if eventType == "Accessories" then
          addaccessory()
       elseif eventType == "Clothing" then
          changeClothing()
          --and so on
       end
    end

Or is there a better way to do this?

I would recommend multiple remote events as this makes the script execute faster and is just looks neater.

1 Like

you can use any of them its fine but in my opinion use multiple remoteevents to avoid getting any errors

1 Like