I made a function that spawns a casing for my assault rifle, i have done this hundreds of times before but its just refusing to work.
code:
local function MakeCasing()
local Bullet = game.ReplicatedStorage.Assets["7.62"]:Clone()
Bullet.Parent = game.Workspace
Bullet.CFrame = Bullet.CFrame:ToObjectSpace(Gun.Eject.CFrame)
Bullet.Velocity = Vector3.new(1,50,0)
game.Debris:AddItem(Bullet, 5)
end
So it spawns 100% ok until I move, once the player moves the casing spawns in the void or in another position. I don’t understand as when I print both values they are the same CFrame. But one is in the void and the other is not.
Image:
I have checked if the part was welded and it is, i know that is not the problem. Any tips?