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

I keep getting an error while doing a touched function?

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)

3 comments

0

This might be a limit of the game you are playing. (this would seem like a pointless script)

1

you can't compare vector3 values like that

0

oh

1 answer

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.

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