Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
5

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

Asked by 6 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 630 — 6y
1
Putting into CurrentCamera sets it so only the LocalPlayer can see it. fireboltofdeath 630 — 6y

1 answer

Log in to vote
0
Answered by
IcyEvil 260 Moderation Voter
6 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 630 — 6y
0
Thanks c: IcyEvil 260 — 6y
Ad

Answer this question