I have this game where I have a object value inside the ReplicatedStorage, I want the object value to act like it’s a child of the player (adding a property to the player), i.e game.Players.LocalPlayer.object-value, but the parent isn’t really the player, How would I do this? I hope I made this clear enough to understand.
I don’t really know how metatables would help you with this, couldn’t you just use an ObjectValue inside the character instead?
I would think you could just create a folder of the same name under replicated storage and add the object value to that, i.e. ReplicatedStorage[Players.LocalPlayer.Name].object-value
I want to be able to be access it by doing this: game.Players.LocalPlayer.object-value, the same way you can do this game.Players.LocalPlayer.Character
99.9% sure you can’t. It just isn’t possible.
The only way you would be able to do this is by putting the object value in the player.
You can wrap Roblox objects to accomplish this functionality. A tutorial has already been written on this:
Is it possible to use that to give a player a new property?
Absolutely! Wrapping the object basically “wraps” the object in a table so you can handle any custom calls appropriately and redirect roblox functions to the actual roblox object.
I still can’t figure it out. Are there any samples that have the player wrapped?