I’m writing a Script thats suppose to Detect the player’s Depth and hight, but I’m getting an Error:
“attempt to compare Vector3”
Is there a way to detect change in a Part’s position?
local player = game.Players.LocalPlayer
wait(.5)
local Character = player.Character
while wait() do
if Character.HumanoidRootPart.Position <= Vector3.new(0,0,0) then
print("Less Than")
print(Character.HumanoidRootPart.Position)
end
if Character.HumanoidRootPart.Position >= Vector3.new(0,0,0) then
print("Grater Than")
print(Character.HumanoidRootPart.Position)
end
end
Don’t know if this post is still relevant but you could do every axis individually because it’s not technically comparing Vector3’s.
if Character.HumanoidRootPart.Position.X <= 0 and Character.HumanoidRootPart.Position.Y <= 0 and Character.HumanoidRootPart.Position.Z <= 0 then
print("Less Than")
print(Character.HumanoidRootPart.Position)
end