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
7 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

local ShellProfile = game.Lighting.ShellStorage.RugerShell:Clone()
ShellProfile.CanCollide = true
ShellProfile.BulletInfo.Frame.Who.Text = ".45ACP | "..script.Parent.Parent.Name.." | " ..script.Parent.Name..""
ShellProfile.Elasticity = 0
ShellProfile.Size = Vector3.new(.3,.3,.5)
ShellProfile.Position = script.Parent.Handle.Position + Vector3.new(0,1,0)
ShellProfile.Velocity = script.Parent.Barrel.CFrame.lookVector * 30 + Vector3.new(math.random(-10,10),20,math.random(-10,10))
ShellProfile.RotVelocity = Vector3.new(0,200,0)
ShellProfile.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 7 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 7 years ago

Add this at the end of your script.

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

Answer this question