My Model Disappears after Play Testing

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)

Before Launching:
image

After Launching
image

2 Likes

set the ODMG’s position to the torso position?

it gave me the same response :sob:

do you mean to clone the ODMG before parenting it?

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

It works now but, I don’t think it brings its children with it.

It looks weird, idk if it’s because I have the mesh with all the parts or what? (I have all the meshes parented to one mesh.)

Have you tried welding the meshes to the one mesh they’re all connected to?

1 Like

There’s a bunch of little meshes in it.
image
It’d be a pain to weld all that I’ll try it out and tell you how it goes ig.

love this plugin

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.

yeah this works nicely had to fix the formatting though.

1 Like

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