Don't use lock object on in conjunction with glue object to limb as it will counteract itself and make the model fly off the screen.
ShotgunAmmo#=7
ShotgunClips#=1
ShotgunMaxAmmo#=7
ShotgunMaxClips#=4
`shot gun positioning
ShotgunOffsetX AS FLOAT = 5.5
ShotgunOffsetY AS FLOAT = -5.0
ShotgunOffsetZ AS FLOAT = 10.0
`shotgun
Shoty=2
`movement
xPos AS FLOAT
yPos AS FLOAT
zPos AS FLOAT
Speed AS FLOAT = 1.0
`////////////////////////////////////////setting\\\\\\\\\\\\\\\\\\\\\\
CLS:HIDE MOUSE
SYNC ON:SYNC RATE 0:SET DISPLAY MODE 640, 480, 16
SYNC : CENTER TEXT SCREEN WIDTH()/2,SCREEN HEIGHT()/2,"Loading..." : SYNC
`/////////////////////////////////////Character\\\\\\\\\\\\\\\\\\\\\\\
MAKE OBJECT SPHERE 1,50
MAKE MESH FROM OBJECT 1,1
ADD LIMB 1,1,1
HIDE OBJECT 1
DELETE MESH 1
`///////////////////////////////////Guns\\\\\\\\\\\\\\\\\\\\\\\\\\
`Shotgun
LOAD OBJECT "H-Shotgun-Static.dbo",Shoty
SCALE OBJECT Shoty,2000,2000,2000
ROTATE OBJECT Shoty,0,WRAPVALUE(-1.1),0
GLUE OBJECT TO LIMB Shoty,1,1
OFFSET LIMB 1,1,ShotgunOffsetx,ShotgunOffsetY,ShotgunOffsetZ
`////////////////////////////////////////////Main Loop\\\\\\\\\\\\\\\\\\\\
make matrix 1, 1000, 1000, 10 ,10
position matrix 1, -500, -20, -500
update matrix 1
DO
IF KEYSTATE(17)=1 THEN MOVE OBJECT 1,Speed
IF KEYSTATE(30)=1 THEN MOVE OBJECT LEFT 1,Speed
IF KEYSTATE(31)=1 THEN MOVE OBJECT 1,-Speed
IF KEYSTATE(32)=1 THEN MOVE OBJECT RIGHT 1,Speed
xPos=OBJECT POSITION X(1)
yPos=OBJECT POSITION Y(1)
zPos=OBJECT POSITION Z(1)
`Mouse Camera Movement
CAMYROTATE#=CAMYROTATE#+MOUSEMOVEX()*0.2
CAMXROTATE#=CAMXROTATE#+MOUSEMOVEY()*0.2
IF CAMXROTATE#>90 AND CAMXROTATE#<135 THEN CAMXCROTAE#=90
IF CAMXROTATE#>270 AND CAMXROTATE#<225 THEN CAMXROTATE#=90
YROTATE CAMERA CAMYROTATE#
XROTATE CAMERA CAMXROTATE#
YROTATE OBJECT 1,CAMYROTATE#
XROTATE OBJECT 1,CAMXROTATE#
POSITION CAMERA 0,xPos,yPos,zPos
SYNC
LOOP
[edit] Also update your object position variable after object movement.