I don’t see where you’re adding the crates to the scene’s main display group…
Try adding them to the scene’s view ‘group’
I was confused, I thought they were still generating after the scene. If they are just still on the screen, it’s because either you are not putting them in the scene’s view (group) or if you don’t want them in the group, you are not removing them when the scene exits. You really should use storyboard as intended and put them in the scene’s group.
Since you’re spawning them in a function outside of the event handlers, you have to setup access to the view in that function.
Add:
local group = scene.view – note, this is NOT self.view, the function isn’t part of scene and doesn’t have a self.
to the top of your SpawnCrates() function. The before you return from the function after creating the crate do:
group:insert(Crate)
That should fix you up.
Ohhhh i get it now … yes you guys are right … i did not put the function into the “group” … im so newbie i didnt even realize what I forgot to place haha … thank you thank you thank you ! @Rob Miracle @Saerothir and other guys who replied … I will do that right now… (Sorry I was late in replying because I just opened my laptop today because of the whole week’s quiz at school xD)