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

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

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

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

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