Hello.
Can anyone say to me if all types created in client - side are removed when the player leaves?
Do I need to create a :Destroy() method in client classes?
Hello.
Can anyone say to me if all types created in client - side are removed when the player leaves?
Do I need to create a :Destroy() method in client classes?
Yes becausr those atuff were only cisible to the client so that means its gone
It should be safe to assume so. The client wouldn’t normally replicate objects to the server unless you have a script that does so. It shouldn’t affect other Players or the server.
When the local player leaves, the client disconnects from the server and the Roblox Client releases all the memory that the Luau VM has allocated from that experience. You should :Destroy()
instances and other custom objects that you create meanwhile the player is in the game, however, leaving will cause the memory to be released regardless of whether you free it manually or not.
So… its not necessary a object in client?.. yes?
Because objects can be created many times, and in the client they’ll be created once.
What do you mean? If the client can access the service (e.g. Workspace) where the object is being added, it would be replicated for them too.
Im sorry, i mean objects like classes (e.g Class.new()). Server create many classes to control player data, like a custom class to manage data store. But, in the client its just necessary one class. so… metatables are not necessary in client right?
Do you mean DataStoreService
? I’m confused on what you’re trying to say here.
Uhm, it depends on whether you yourself use metatables in your scripts.