I have a dress up system which has 3 different sections:
- Clothes
- Faces
- 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?