Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Pistol shell not moving from the air?

Asked by
Prestory 1395 Moderation Voter
8 years ago

So i scripted a gun and when i shoot the gun the shell thats meant to come out stays in the air i tryed add velocity

1local ShellProfile = game.Lighting.ShellStorage.RugerShell:Clone()
2ShellProfile.CanCollide = true
3ShellProfile.BulletInfo.Frame.Who.Text = ".45ACP | "..script.Parent.Parent.Name.." | " ..script.Parent.Name..""
4ShellProfile.Elasticity = 0
5ShellProfile.Size = Vector3.new(.3,.3,.5)
6ShellProfile.Position = script.Parent.Handle.Position + Vector3.new(0,1,0)
7ShellProfile.Velocity = script.Parent.Barrel.CFrame.lookVector * 30 + Vector3.new(math.random(-10,10),20,math.random(-10,10))
8ShellProfile.RotVelocity = Vector3.new(0,200,0)
9ShellProfile.Parent = game.Workspace

that is my script may someone help the shell just stays in the air.

2 answers

Log in to vote
0
Answered by 8 years ago

make the shell unanchored so that it will drop on the ground

accept answer and upvote if helped

Ad
Log in to vote
0
Answered by 8 years ago

Add this at the end of your script.

1ShellProfile.Anchored = false
0
Itt still goes flying through the ground Prestory 1395 — 8y

Answer this question