How would I insert a part into workspace that only one person could see?
There are two ways to do this, I will be using the one that does not require FilteringEnabled (FE.)
Useful Resources:
http://wiki.roblox.com/index.php?title=API:Class/Workspace/CurrentCamera http://wiki.roblox.com/index.php?title=API:Class/LocalScript
Alright, what you'd need to do is have a LocalScript
somewhere within the player or character (this includes PlayerGui
/StarterGui
, Backpack
, Humanoid
, etc.)
In that LocalScript, you will be inserting a part into the local player's CurrentCamera
, like so:
Local Part Insertion
LocalScript
in StarterGui
local localCamera = game.Workspace.CurrentCamera Insert.new("Part", localCamera)
Anything in the local player's CurrentCamera
can only be seen by that player.
The downside with using this technique, though, is that scripts cannot run inside CurrentCamera
, so I do not suggest using this technique if you have scripts in those parts or anything like that. A solution to this is to have the scripts outside of CurrentCamera
, yet the parts inside, and edit those parts that way.
I also suggest that you learn to use FilteringEnabled
:
http://wiki.roblox.com/index.php?title=Client-Server_Model_and_FilteringEnabled
If you found my solution helpful, consider leaving an upvote and accepting my answer. Also, check out my website: http://robloxguides.com/!
To do this you will need a local script on backpack. What you will do is make the local script target the local player's camera.
So, you only need to do
part.Parent = workspace.CurrentCamera
CurrentCamera
returns the local player's current camera. On scripts itll return the template camera.
Hope this helps!