hi
i’d like the bullet to out right and up out of the chamber
Shell.AssemblyLinearVelocity = Vector3.new(10,10,0)
this is what im trying right now and its not working
Shell.AssemblyLinearVelocity = Vector3.new(10,10,0)
this is what im trying right now and its not working
You could use CFrames which are relative to the object’s rotation unlike Vector3 positions.
Shell.AssemblyLinearVelocity = (Shell.CFrame.Rotation * CFrame.new(10, 10, 0)).Position
You can make ejectionDireciton on the gun and apply:
Caliber.Casing.AssemblyLinearVelocity = EjectionDirection.LookVector * 25 -- change 25 to whatever force
Use CFrame:VectorToWorldSpace().
https://create.roblox.com/docs/reference/engine/datatypes/CFrame#VectorToWorldSpace
@aeroactual this is cleaner than what I suggested you should do this instead.
I don’t understand your solution. What is EjectionDirection? That isn’t a built-in class.
SuperClass: BasePart
Class: Part
How I implement this for my gun:

Ah that makes more sense. Thanks for explaining.
thanks for replies
i cant figure out how to use this for what im trying to do
Shell.AssemblyLinearVelocity = EjectAttach.CFrame:VectorToWorldSpace( Vector3.new(0,0,1) ) * Vector3.new(10,10,0)
Attachment.CFrame is an offset relative to the parent, you need to use Attachment.WorldCFrame instead.
Shell.AssemblyLinearVelocity = EjectAttach.WorldCFrame:VectorToWorldSpace( Vector3.new(0,0,1) ) * Vector3.new(10,10,0)
Like this?
CFrame:VectorToWorldSpace() returns a Vector3, using the multiplication operator with another Vector3 just multiplies each component (X, Y, Z). For example, <1, 0, 0> * <10, 10, 10> is <10, 0, 0>.
Do this to fix it:
Shell.AssemblyLinearVelocity = EjectAttach.WorldCFrame:VectorToWorldSpace( Vector3.new(0,0,10) )
Alternatively:
Shell.AssemblyLinearVelocity = EjectAttach.WorldCFrame:VectorToWorldSpace( Vector3.new(0,0,1) ) * 10
-- Equivalent to:
Shell.AssemblyLinearVelocity = EjectAttach.WorldCFrame:VectorToWorldSpace( Vector3.new(0,0,1) ) * Vector3.new(10, 10, 10)
Ohh okay thank u , thhis worked
drgdgbd gdg dg
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.