Trying to make a Dance Dance Revolution system, need help with hit detection

Hello people of the DevFourm! (This is my first post, sorry if it’s bad)

I’m trying to make a DDR (Dance Dance Revolution) system, and I’ve gotten most of it down. When pressing a key it checks for an ImageLabels position on the GUI to see if it’s a “Hit” or “Miss”, but it seems to always say “Miss!”.
and yes, I am bad at scripting. :sunglasses:

Edit here, the arrows are moving upward towards a base arrow, which those 2 positions are on the top and bottom of it.

function hitCheck(arrowTable)
	if arrowTable[1].Position.Y.Scale > 0.32 and arrowTable[1].Position.Y.Scale < 0.08 then
		print("Hit!")
		arrowTable[1]:Destroy()
		table.remove(arrowTable, 1)
	else
		print("Miss!")
		arrowTable[1]:Destroy()
		table.remove(arrowTable, 1)
	end
end

There is no number that would be greater than 0.32 and smaller than 0.08. You either meant to use or instead of and or X instead of Y in your if statement condition.

1 Like

Ugh, always the simple things I mess up.
Meant to make it the other way around with the signs, I overlook such things all the time.
Thank you.

1 Like