Bullet Casing ignores physics

Basically, the bullet casing ignores physics, and stays still in the air despite being unanchored.

I genuinely have no idea why this happens

Here is the casing script

local function ejectBulletCasing()
	print("case thing")
	local casing = bulletCasingTemplate:Clone()
	casing.Transparency = 0
	casing.Anchored = false
	casing.CFrame = ejectPoint.WorldCFrame
	casing.Parent = game.Workspace

	-- Up and right
	local ejectVelocity = Vector3.new(math.random(13, 15), math.random(10, 15), math.random(-1, 1))
	casing.AssemblyLinearVelocity = ejectVelocity

	-- Spinning
	local angularVelocity = Vector3.new(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5))
	casing.AssemblyAngularVelocity = angularVelocity

	game:GetService("Debris"):AddItem(casing, 2.5)
end

Properties

if you know anything about physics and could help, it would be greatly appreciated

I think it would be better to use :ApplyImpulse()

is there a reason for assemblylinearvelocity not working

AssemblyLinearVelocity should work. I dont know though if its depricated or not. Are you sure the bullets are unanchored and not welded to something?

Yeah, they are unanchored. Its not welded to anything to my knowledge, unless studio auto creates welds

look at the server and also try setting the network ownership of the casing to whoever shot it (after seeing if its any different on the server)

The bullet casing’s are created on the client

can you try to walk into one of the casings? i want to see if the bullets are in a sleep-state or not

edit: if they are you can try to force them to wake up with these things


it shows them as awake too

try set Anchored=false on the template casing directly.
and/or add a task.wait() before setting its velocities. see if it is the physics system overrides the velocities when it processes the freshly created instance.

make sure network ownership is set to client so the client can apply velocity

The bullet casing is created on the client

1 Like

I just found out its probably a new issue entirely, the physics dont even work at all in studio.

Here’s a video of me making a completely new thing, and making an unanchored part then playtesting it


Correct me if I’m wrong but I think this isn’t supposed to happen. Is there a fix?

I fixed this by disabling physics enviormental throttle, i blame roblox for this issue

try running into the part maybe? Try playing a template and see if the physics works like on the car one.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.