So, i've made a game containing a cube, and some arrows. I've programmed the cube to move in different directions when i touch the same arrows. I wanted to add a score, but when i tried adding small yellow cubes i ran into a problem. Cause the cube has a script for each direction that goes something like this.
while true do
script.Parent.Position = script.Parent.position + Vector3.new(-1,0,0)
wait(0.10)
end
It also contains a bunch of other stuff, but that is irrelevant. The point is that when my cube hits another block, instead of going trough it, the cube goes above it, and then continues in the previous direction. I tried to fix this by turning CanColide off on the small yellow cube. This made my cube able to go trough it easily. But when i tried to add a onTouch function the the small cube, it went back to my old problem, where my cube would just go above the object instead of going trough it.
The reason why i want the cube to go trough the small yellow cubes is because i want the small yellow cubes to delete themself, and then add some points to my score. I don't know how to fix it, so i hope i can get some help.
:)

2 comments
Thank you so much. I'll look into it. If i could like your answer, i would have. :)
You could probably accept it as correct