Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Putting parts into a player's camera

3 answers

✓ Accepted answer

As the first answerer said, you put the part into the Player's 'CurrentCamera' which is a property inside of Workspace(The more you know) and not some object in the Workspace, but anyhow, how will you do this? Well that's where I will show you:

part = Instance.new("Part", game.Workspace.CurrentCamera)
part.Position = Vector3.new(xVal, yVal, zVal)
part.Rotation = Vector3.new(xVal, yVal, zVal)

This would have to be used inside of a Local Script.

~~Hope I helped.

Well, using a Local Script you could put the parts in the players CurrentCamera (Game.Workspace.CurrentCamera) And only that person would be able to see those parts.

OK, next time try be more specific in the question... It kinda confused me, like you were purposely trying to obfuscate the question.

I know how to do it in a 1 script, but it'd be easier to explain this way.

OK, pretty simple really. Put a script in the Part that you want to be visible in an area. Change the script from print("Hello World!") to this:

while wait(0.05) do
if script.Parent.CFrame ~= CFrame.new(xAxis, yAxis, zAxis) then
script.Parent.Transparency = 1
else
script.Parent.Transparency = 0
end
end

And now, to put the brick in the player's Camera, you'll need a localscript. You can use this script for the localscript, unless you want something more complicated, then make your own.

LocalScript:

Part = PartLocationHere
Part.Parent = Game.Workspace.CurrentCamera

Well, I hope this helped.

  • Kratos232

This discussion is preserved as it was. New answers, comments, and votes are closed.