Pls tell me what is wrong whith this bit of code it ceeps saying sim error failed cast on null

2 Likes

that has nothing wrong, please send the link.

1 Like
1 Like

And it is only that start part

1 Like

You haven’t defined a sprite just create one on start

2 Likes

In a lot of your code you’re trying to tun sprite functions on 'mySprite but you’ve removed the code that sets the var mySprite as a sprite from your ‘on start’ block.

As it’s not being created as a sprite you cannot call sprite functions on that var.

Fix this by dragging this big ole’ chunk of code back into your ‘on start’ and it’ll start working again:
image

2 Likes

There’s a forever function in there with an if statement containing variable “mySprite”, but the sprite wasn’t made yet in the start function/levle function, so the game freaks out

1 Like

well, that’s the problem you had @Frastheman

Thank you all very much

2 Likes

fixed it!

Also here is a pfp!
Screenshot 2024-07-20 2.55.24 AM