I can't seem to get collision detection working, it doesn't print "ded" at all. How do I fix this?

local char = script.Parent

while wait() do
	if char.Position.Y.Offset >= 520 or char.Position.Y.Offset <= 145 then
		print("ded")
	end
end

I can't even imagine what the problem is, I don't normally do gui work.

4 comments

1

How can the position be greater than 520 and less than 145 at the same time?

0

^

0

oh i changed it to an or statement, ill update the code, it still doesn't work though, it'll work when it gets to the "ceiling" but not the "floor"

0

Not enough insight to the problem. I don't know what this is, so I cannot help you fix it.