Requesting help for coding problem

Hello Cospaces, I am trying to make a game where a ball is randomly aimed towards you or an NPC and you have to hit the ball before it hits you, but i seem to be having some problems. Here is the link and if you want more information ill provide it. CoSpaces Edu :: CoSpace 3

I fixed the original problem but now i have a new one.
every time the sword collides with the ball it continues the function as if the ball is on the player,causing the cube to glitch out. Will sombody please help me?

Hi @Caseoh_fights

Can you give us a little more detail on what exactly is going wrong for you and how it should be working? It wasn’t immediately clear from looking at the CoSpace.

Then we can help you properly :slight_smile:

Hello @CoSpaces_Edu I have stopped working on that game because of the bug but the problem was inside the function. I made it so there was a switch that made the ball go onto either the player or the bot but sometimes when the player hits the ball the bot’s function glitches out and causes it to repeat until it launches at the player. I would keep working on this game if the bug got fixed!

1 Like