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

[SOLVED] Camera.CFrame.Z not working in if statement?

Asked by
H4X0MSYT 536 Moderation Voter
6 years ago
Edited 6 years ago
cam.Changed:connect(function()
    local Z = cam.CFrame.Z
    local X = cam.CFrame.X
    print(Z)
    if Z > 35 and Z < 85 then
        print "hi"
    end
end

Is some code I have. Problem is, Z does not work with an if statement. I have tried;

if Z > 1 then
    print('hi')
end

Even that does not print hi to the console. At this point I have absolutely no idea why this is so. X works fine.

1 answer

Log in to vote
0
Answered by
H4X0MSYT 536 Moderation Voter
6 years ago

Resolved, In the console the the number didn't show a negative. It was very hard to see.

Ad

Answer this question