Rvzol
(Aiden)
January 16, 2025, 2:41am
#1
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
Aiden:
local ejectVelocity = Vector3.new(math.random(13, 15), math.random(10, 15), math.random(-1, 1))
casing.AssemblyLinearVelocity = ejectVelocity
I think it would be better to use :ApplyImpulse()
Rvzol
(Aiden)
January 16, 2025, 3:31am
#3
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?
Rvzol
(Aiden)
January 16, 2025, 3:49am
#5
Yeah, they are unanchored. Its not welded to anything to my knowledge, unless studio auto creates welds
ew_iscool
(professional)
January 16, 2025, 3:55am
#6
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)
Rvzol
(Aiden)
January 16, 2025, 3:59am
#7
The bullet casing’s are created on the client
ew_iscool
(professional)
January 16, 2025, 4:06am
#8
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
Rvzol
(Aiden)
January 16, 2025, 4:25am
#10
it shows them as awake too
EtNowis
(EtNowis)
January 16, 2025, 5:28am
#11
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
Rvzol
(Aiden)
January 17, 2025, 10:23pm
#13
The bullet casing is created on the client
1 Like
Rvzol
(Aiden)
January 17, 2025, 10:58pm
#14
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?
Rvzol
(Aiden)
January 18, 2025, 12:32am
#15
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.
system
(system)
Closed
February 1, 2025, 1:53am
#17
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.