Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why won't anything weld to player's arms?

I'm having trouble welding anything to the player's arms. In a server script, I have a script that's supposed to put a ParticleEmitter inside the player's RightUpperArm and LeftUpperArm. But for some reason, it doesn't get put inside. I tried welding a normal brick to the arm, as well, and that didn't, either. When I replace "RightUpperArm" with "HumanoidRootPart," however, everything works fine, and it's put inside the rootpart like normal. There's a few prints I threw in there, and they both print out just fine, so I'm not sure why it doesn't work.

Here's the script:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)

		local drip = game.ServerStorage.DripParticles:Clone()
		drip.Parent = char:WaitForChild("RightUpperArm")
		print("Drip1 Cloned")
		local drip2 = game.ServerStorage.DripParticles:Clone()
		drip2.Parent = char:WaitForChild("LeftUpperArm")
		print("Drip2 Cloned")
	
	end)
end)

2 comments

0

since its a particle emitter, can't you clone the particle into the arm? If you wanted to weld create the instance, create attachments in the arm then use those attachments as c0 and c1

0

What do you mean? I tried cloning the particle into the arm, but for some reason, nothing happened. :( I did try putting the emitter into an attachment, too, but that didn't do anything, either.

1 answer

That's not the correct way to weld something. This would be it. Note that I instantiate a Weld, set its properties and parent it to the thing to weld, and then parent this thing to workspace.

local thingToWeld = ReplicatedStorage.Thing:Clone()

-- Make sure these properties are false if you don't want issues
thingToWeld.Anchored = false
thingToWeld.CanCollide = false

local character = player.Character or player.CharacterAdded:Wait()

local weld = Instance.new('Weld')
weld.Part0 = thingToWeld
weld.Part1 = character.PrimaryPart
weld.C0 = character.PrimaryPart.CFrame
weld.C1 = character.PrimaryPart.CFrame
weld.Parent = thingToWeld

thingToWeld.Parent = character

Glad to help :) remember to accept the answer if you find this useful! Thank you <3

This discussion is preserved as it was. New answers, comments, and votes are closed.