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

idk how to fix this error local 'weld' (a nil value) its keeps showing up how do i fix?

19:17:54.504 - Workspace.Script:10: attempt to index local 'weld' (a nil value)

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player)
	
	
	for _,put in pairs(game.Workspace.Dummy:GetChildren()) do
		if put:IsA("BasePart") then
			
			local ip = put:Clone()
			wait(1)
				local weld Instance.new("Weld")
				weld.Part0 = ip
			ip.Parent = workspace
		
			
			
			
			for _,i in pairs(player.Character:GetChildren()) do
		
		if i:IsA("BasePart") then
			i.Transparency = 1
			local findpart = player.Character:FindFirstChild(ip.Name)
			if findpart then
				weld.Part1 = findpart
			end
			
		end
			end
			
			
			
			
		end
	end
	

	
	
end)

1 answer

✓ Accepted answer

Your local weld is missing a = sign. It's ment to be local weld = Instance.new("Weld")

1 comment

0

thx Xd

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