If a player is wearing a package my script breaks

In a part of my clapping script, I am welding a part to the players hands the contains the clap sound effects that will be randomly played, the problem is in the setup if a player is wearing a package it will not weld the part to their hand, I am getting no errors besides that the part containing the sounds doesn’t exist.

I have tried using both a weld and a weld constraint, it makes no difference.

Here is my code:

	local Sounds = game.ReplicatedStorage.Claps.SoundEmitter:Clone()
	local Character = player.Character or player.CharacterAdded:Wait()
	local Hand = Character:WaitForChild("RightHand")
	print(Hand)
	local Weld = Sounds.Weld
	
	Sounds.Parent = Hand
	Sounds.CFrame = Hand.CFrame
	Weld.Parent = Hand
	Weld.Part0 = Hand
2 Likes

Change your game settings to R15 only

It has always been r15 only, It’s not a problem of not finding the hand, it finds the hand, I have checked with a print, but it just won’t put the sound emitter into it.

1 Like

Is sound a part or a actual sound object

It is a part welded to the players hand that contains 5 different sound objects

Can you send more of your code it’s not much to work with

Or is that all 30 charssssssssss

The rest is only an event that fires when a player joins

This issue is very interesting if it works fine with a normal body why would it break with packages

That’s what I have been trying to figure out.

Is this in a local script or a server script?

Does it say anything like infinite yield possible in the output?

A server script (30 characters)

Can you show the full script please?

No. (thirty characterssssssss)

R6 has right hands and left hands but r15 uses Upper and Lower Right and Left Hands

so thats the best answer for you probably

game.Players.PlayerAdded:Connect(function(player)
		local Sounds = game.ReplicatedStorage.Claps.SoundEmitter:Clone()
		local Character = player.Character or player.CharacterAdded:Wait()
		local Hand = Character:WaitForChild("RightHand")
		print(Hand)
		local Weld = Sounds.Weld
		
		Sounds.Parent = Hand
		Sounds.CFrame = Hand.CFrame
		Weld.Parent = Hand
		Weld.Part0 = Hand
end)

The game is r15 only, It’s not about r6 not working because there is no r6 in the game, its about if a player is not wearing a package it works but if they are it wont.

Thanks for the script, it will help me alot (in helping you solve the problem)

what line of the code which breaks it then