Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
5

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

Asked by 10 years ago

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)
1
I am only a beginner scripter. fireboltofdeath 635 — 10y
1
Putting into CurrentCamera sets it so only the LocalPlayer can see it. fireboltofdeath 635 — 10y

1 answer

Log in to vote
0
Answered by
IcyEvil 260 Moderation Voter
10 years ago

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.

0
Quick tips It is {X,Y,Z} and Brick.Transparency = 0 fireboltofdeath 635 — 10y
0
Thanks c: IcyEvil 260 — 10y
Ad

Answer this question