i have a game where players have a gui to select attachments, when an attachment is selected script reads some values etc. and then uses a module to attach the attachment, but if i attach 2 different types of attachments (like scope + supressor) the one thats added later just breaks and spawns far away. heres the source file to my place;
how can i fix it? i tried multiple solutions thats why the scripts uses more values than they should do, can someone try to fix it or maybe tell me some ways to do it please? i was really hoping that i would be able to make a good attachment system, i solved many bugs and now im stuck here, i tried using WorldCFrame, CFrame, Position, Parenting the attachment to attacpart, parenting the attachment to parent of attacpart… and some more solutions
guys… please help me… i dont wanna see attachments positioned 5000 studs away in my dreams… im going crazy… i tried 20 solutions, asked google, asked in devforum twice, asked in 5 biggest development servers in discord and still no solution… i wanna sleep!
while wait(1) do
if script.Parent.Parent:FindFirstChild("Silencertype") then
script.Parent.CFrame.Position = script.Parent.Parent.Silencertype.firepos.WorldPosition
end
end
hey man, so im trying to set firepart’s position to a Attachment’s position in the silencer part, but it changes gun’s orientation too, i dont really need the orientation at all, i just have to set its position or CFrame to the silencer’s firepos because bullets hould come out of the silencer , but it doesnt works, can you help?
script is in the firepart, firepart is in the gun model, silencer is in the gun model too.