I’d like to create a render distance system to turn other Humanoids transparent when my localcharacter is not close to reduce lag.
I’ve tried getting the position of both my character and the other humanoids and running checks to see positions to change the transparency, but I can’t get this script working!
I am putting my script in StarterPlayerScripts as a local player.
To me, the approach you tried to take is the most logical one. It should consist of magnitude checks and using table.sort to make the players within a certain distance invisible.
I can write the code for you but is this feature really necessary for your game? I don’t think making other players transparent will solve any issues here.
My game is oriented as an Outfit Store, there will be upwards of 600+ Humanoids (Basically mannequins) in the game, which may cause a lot of lag once all the outfits are imported which may be a big trouble for the playerbase.
I don’t really want to use StreamingEnabled either as the build is quite large and cuts off a lot of needed visuals.
I believe this still wouldn’t do anything since the humanoid is still there in the client, it’s just invisible. How about you store the different humanoid’s positions and just have the script that’ll put those humanoids in some folder (like in replicated storage) if the humanoid’s position is too far for the player’s current position, then just load it back up when the magnitude between the player and the mannequin are in range for it to be loaded.
You’re totally right, would cloning a group of mannequins when entering a certain area be effective for this so I won’t have to run constant checks for the players magnitude?