How to check if a part is viewed on the client?

so when a player is playing on graphics one some parts arent shown depending on the distance
image
so how to find if its randered or not for the player?

The part just won’t load for the player until it renders in. So you could just do:

--a LocalScript
local part = workspace:FindFirstChild("PartNameHere")
if part then
    print("Rendered")
end

or you could just make it so it is always rendered in by editing/disabling the Streaming properties of the workspace.

what if i want to get that unrandered part to make a ui that tells the player where is the enemy if the player in front of them is having higher graphics?

Since the part will just return as nil when unrendered on the client, it’d be quite difficult. You’d need to:

  1. Work out the player’s render distance
  2. Use a RemoteEvent to send that to the server
  3. Have the server work out whether the enemy is rendered or not
  4. Do whatever you want to do if it is rendered or not
  5. Tell the client to show those things

As I said, it’s really hard. I’m not sure how to do it, so I won’t be able to help further. Hope this helps.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.