#i need to be critiqued

1 messages · Page 1 of 1 (latest)

naive bay
#

so a few things just skimming it, you do not need to use pairs to iterate tables anymore, you can just do in whatever:GetChildren(), same with ipairs unless you explicitly need to iterate exclusively through table elements that are represented by integer keys

#

Secondly I wouldn't GetService on ReplicatedStorage 5 times, I would just declare it in the global scope since you're indexing it so much for other variables. Also you probably shouldn't InvokeServer so many times like that, you could have one invoke if you absolutely need to and you could pack all the info that the individual calls would return, without as much network redundancy.

naive bay
#

Glancing at it again, I personally wouldn't do a while loop in a new thread like that when you can connect to renderstepped and track the event handler, allowing you to escape out of the loop when you need by :Disconnect() ing that thingaling. If the code works, that's great, but should it be the client deciding to FireServer in response to changes to your character Race? I feel like that's something you could do on the server side to avoid that weird client dependency

#

hard to tell why it's necessary to have that happen, it's like if the client changes the character race, the server in changing the race should just set the expected tone and appearance for that, what you're doing is like a bounce back and forth