I wanted to weld my model to the character but I guess that isn’t happening because the model is disappearing like Houdini. Anyways here’s the code that I use to weld it if that’s any help.
Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local torso = char.Torso
char.Parent = workspace.Characters
local ODMG = WeaponModels.ODMG
ODMG.Parent = char
-- add a if statement to see if they have odmg
welds[plr] = WeaponsWeld.ODM:Clone()
welds[plr].Parent = torso
welds[plr].Part0 = torso
welds[plr].Part1 = ODMG
end)
Where is the weapons folder located?
If it is in workspace, check filteringenabled and the position of your model. If it is anywhere the client can’t access(serverstorage, serverscriptservice, …) then it also won’t be replicated.
Why are you cloning a weld?
In this instance create a new weld, or have a weld inside the model already there, and set the Part0, Part1, C0 and C1 of that weld.
This happens because the body is moving towards the gun.
You can avoid this in several ways, but just to test, move the CFrame from the gun to the Torso position before using Weld.
Quick example:
local CloneODMG = WeaponModels.ODMG:Clone()
CloneODMG.Parent = workspace
CloneODMG.CFrame = torso.CFrame
-- Then weld
Maybe make a script that automatically adds the WeldConstraints to all the children (I’m on mobile, so formatting will be a bit bad):
for _, object in pairs(ODMG:GetChildren()) do
if object:IsA("Type_Of_Instance_Here")
local Weld = Instance.new("WeldConstrait")
Weld.Parent = object
Weld.Part0 = object
Weld.Part1 = ODMG
end
end
That’s an example script for a WeldConstrait welding. Feel free it modify it to your likings and to your variables.