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

I keep getting an error while doing a touched function?

Asked by 5 years ago
Edited 5 years ago

Hello , i was doing a UNO script for void script builder, and i did a skip card , but it has an error , i dont know why , the error says that i cant compare user data

part_1.Touched:Connect(function(char)

if part_1.Orientation <= Vector3.new(0,-170,0) then

if char.Parent ~= Character then

local charrrr = char.Parent

char.Parent:ClearAllChildren()

charrrr:Destroy()

end

end

end)

0
This might be a limit of the game you are playing. (this would seem like a pointless script) AltNature 169 — 5y
1
you can't compare vector3 values like that theking48989987 2147 — 5y
0
oh maumaumaumaumaumua 628 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

You can't really compare if a Vector3 is less than or equal to another Vector3. That's just not how those work. You can compare a specific axis as a number to see if that's less than another number, but trying it on anything rather than numbers just doesn't make sense.

Ad

Answer this question