Ok, I added a do loop, but I get a runtime error when I try to run it.
It says, Line 11, Object already created.
rem Make Gun
Make object cube 1,2
XRotate Object 1,90
Fix object pivot 1
Scale object 1,100,100,500
position object 1,0,-7,15
Lock object on 1
Rem Make bullet
do
Make Object Sphere 2,2
Hide object 2
if Mouseclick()=1 and BulletLife=0
Position object 2,X#,Y#+43,Z#
Set object to camera orientation 2
BulletLife =25
Show object 2
Endif
If BulletLife > 0
Dec BulletLife
Move object 2,20
If BulletLife = 0 then Hide object 2
Endif
loop
sync
Why change the the world when it changes itself?