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

How do I activate something when a person's camera is looking a certain way?

Okay. There is a game when you look through the door bricks appear. I don't know how to set if the player is looking that way then it appears. All I know is to put this in a local script

P = Instance.new("Part", game.Workspace.CurrentCamera)
P.CFrame = CFrame.new(xVal,zVal,yValw)
P.Size = Vector3.new(xVal,yVal,zVal)

2 comments

1

I am only a beginner scripter.

1

Putting into CurrentCamera sets it so only the LocalPlayer can see it.

1 answer

✓ Accepted answer

Perhaps use a Function

function Camera()
	Brick = game.Workspace.Part
	Player = game.Workspace.findFirstChild(Humanoid)
if Player.Position == {"X","Y","Z"}
	then Brick.Transparency = "0"
	wait(3.0) -- Put whatever number there
end
end
Camera()

this may not work but it still might.

2 comments

0

Quick tips It is {X,Y,Z} and Brick.Transparency = 0

0

Thanks c:

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